home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / mint / lib / mlib42d.zoo / diffc < prev    next >
Text File  |  1994-01-16  |  104KB  |  3,880 lines

  1. *** 41.1    1993/11/03 13:33:02
  2. --- abs.c    1993/11/24 20:22:04
  3. ***************
  4. *** 1,6 ****
  5. --- 1,13 ----
  6.   /* return absolute values */
  7.   #include <stdlib.h>
  8.   
  9. + #ifdef abs
  10. + #undef abs
  11. + #endif
  12. + #ifdef labs
  13. + #undef labs
  14. + #endif
  15.   int abs(x)
  16.   int x;
  17.   { return x < 0 ? -x : x; }
  18. *** 41.1    1993/11/03 13:33:02
  19. --- bblink.c    1994/01/13 08:03:30
  20. ***************
  21. *** 5,38 ****
  22.   #include <compiler.h>
  23.   #include <stdio.h>
  24.   #include <stdlib.h>
  25.   
  26. ! /* block count struct produced by gcc -tcov */
  27. ! typedef struct _bb_count {
  28.       long    initialized;    /* has __bb_init_func been called */
  29. !     char    *filename;    /* filename for .d file          */
  30. !     long    *block_counts;  /* address of block count table   */
  31. !     long    ncount;        /* sizeof block count table       */
  32.                       /* ie: # of basic blocks in file  */
  33. !     struct _bb_count *next;    /* in memory link to next struct  */
  34. !     char    ***addr_table;  /* addr of basic block address table */
  35. !                 /* size of addr_table == ncount+1    */
  36. ! } BB_COUNT;
  37.   
  38. ! void __bb_init_func __PROTO((BB_COUNT *));
  39.   static void exit_func __PROTO((void));      /* installed to be called at exit */
  40. ! static void save_info __PROTO((BB_COUNT *));
  41.   
  42.   /* vars */
  43. ! static BB_COUNT *hdr = NULL;    /* list of all bb_count for which 
  44.                          __bb_init_func has been called */
  45.   static char first_call = 1;    /* flags first call to __bb_init_func */
  46.   static char at_exit_failed = 0; /* flag to indicate that atexit() failed */
  47.   
  48.   /*
  49. !  * called by gcc -tcov generated code on first entry into a function
  50.    */
  51.   void __bb_init_func(bb_count)
  52. ! BB_COUNT *bb_count;
  53.   {
  54.       if(at_exit_failed)
  55.       return;
  56. --- 5,48 ----
  57.   #include <compiler.h>
  58.   #include <stdio.h>
  59.   #include <stdlib.h>
  60. + #include <time.h>
  61. + #include <string.h>
  62.   
  63. ! /* block count struct produced by gcc -a */
  64. ! struct bb {
  65.       long    initialized;    /* has __bb_init_func been called */
  66. !     const char    *filename;    /* filename for .d file          */
  67. !     long    *counts;    /* address of block count table   */
  68. !     long    ncounts;    /* sizeof block count table       */
  69.                       /* ie: # of basic blocks in file  */
  70. !     struct bb *next;        /* in memory link to next struct  */
  71. !     const unsigned long    *addresses; /* addr of basic block address table */
  72. !                 /* size of address table == ncounts+1 */
  73. !     /* Older GCC's did not emit these fields.  */
  74. !     long nwords;
  75. !     const char **functions;
  76. !     const long *line_nums;
  77. !     const char **filenames;
  78. ! };
  79.   
  80. ! void __bb_init_func __PROTO((struct bb *));
  81.   static void exit_func __PROTO((void));      /* installed to be called at exit */
  82. ! #ifdef OLD
  83. ! static void save_info __PROTO((struct bb *));
  84. ! #endif
  85.   
  86.   /* vars */
  87. ! static struct bb *bb_head = NULL; /* list of all bb_count for which 
  88.                          __bb_init_func has been called */
  89.   static char first_call = 1;    /* flags first call to __bb_init_func */
  90.   static char at_exit_failed = 0; /* flag to indicate that atexit() failed */
  91.   
  92.   /*
  93. !  * called by gcc -a generated code on first entry into a function
  94.    */
  95.   void __bb_init_func(bb_count)
  96. ! struct bb *bb_count;
  97.   {
  98.       if(at_exit_failed)
  99.       return;
  100. ***************
  101. *** 51,71 ****
  102.   
  103.       if(bb_count->initialized == 0)
  104.       {   /* link into list of bb_counts */
  105. !     bb_count->next = hdr;
  106. !     hdr = bb_count;
  107.       bb_count->initialized = 1;
  108.       }
  109.   }
  110.   
  111.   /*
  112.    * called on normal exit
  113.    *   write out block profile files for each bb_count struct in list.
  114.    */
  115.   static void exit_func()
  116.   {
  117. !     BB_COUNT *p;
  118.   
  119. !     for(p = hdr; p; p = p->next)
  120.          save_info(p);
  121.   }
  122.   
  123. --- 61,82 ----
  124.   
  125.       if(bb_count->initialized == 0)
  126.       {   /* link into list of bb_counts */
  127. !     bb_count->next = bb_head;
  128. !     bb_head = bb_count;
  129.       bb_count->initialized = 1;
  130.       }
  131.   }
  132.   
  133. + #ifdef OLD
  134.   /*
  135.    * called on normal exit
  136.    *   write out block profile files for each bb_count struct in list.
  137.    */
  138.   static void exit_func()
  139.   {
  140. !     struct bb *p;
  141.   
  142. !     for(p = bb_head; p; p = p->next)
  143.          save_info(p);
  144.   }
  145.   
  146. ***************
  147. *** 78,88 ****
  148.    * given a bb_count struct, save info into .d file
  149.    */
  150.   static void save_info(p)
  151. ! BB_COUNT *p;
  152.   {
  153.       FILE *fp;
  154.       long i, *bcounts;
  155. !     DINFO *dinfo = malloc(p->ncount * sizeof(DINFO));
  156.   
  157.       if(!dinfo)
  158.       {
  159. --- 89,99 ----
  160.    * given a bb_count struct, save info into .d file
  161.    */
  162.   static void save_info(p)
  163. ! struct bb *p;
  164.   {
  165.       FILE *fp;
  166.       long i, *bcounts;
  167. !     DINFO *dinfo = malloc(p->ncounts * sizeof(DINFO));
  168.   
  169.       if(!dinfo)
  170.       {
  171. ***************
  172. *** 97,118 ****
  173.       return;
  174.       }
  175.       /* read .d file & accumulate counts */
  176. !     for(i = 0, bcounts = p->block_counts;
  177.           fscanf(fp, "%ld%ld", &dinfo[i].lineno, &dinfo[i].count) == 2; i++)
  178.       {
  179. !     if(i >= p->ncount)
  180.           {
  181.             fprintf(stderr, "Block counts in %s exceed expected %ld, rest skipped\n",
  182. !             p->filename, p->ncount);
  183.             break;
  184.           }
  185.       dinfo[i].count += bcounts[i];
  186.       }
  187.       fclose(fp);
  188. !     if(i < p->ncount)
  189.       {
  190.         fprintf(stderr, "Warning Block counts in %s less than expected %ld\n",
  191. !             p->filename, p->ncount);
  192.       }
  193.       if((fp = fopen(p->filename, "w")) == NULL)
  194.       {
  195. --- 108,129 ----
  196.       return;
  197.       }
  198.       /* read .d file & accumulate counts */
  199. !     for(i = 0, bcounts = p->counts;
  200.           fscanf(fp, "%ld%ld", &dinfo[i].lineno, &dinfo[i].count) == 2; i++)
  201.       {
  202. !     if(i >= p->ncounts)
  203.           {
  204.             fprintf(stderr, "Block counts in %s exceed expected %ld, rest skipped\n",
  205. !             p->filename, p->ncounts);
  206.             break;
  207.           }
  208.       dinfo[i].count += bcounts[i];
  209.       }
  210.       fclose(fp);
  211. !     if(i < p->ncounts)
  212.       {
  213.         fprintf(stderr, "Warning Block counts in %s less than expected %ld\n",
  214. !             p->filename, p->ncounts);
  215.       }
  216.       if((fp = fopen(p->filename, "w")) == NULL)
  217.       {
  218. ***************
  219. *** 120,126 ****
  220.       free(dinfo);
  221.       return;
  222.       }
  223. !     for(i = 0; i < p->ncount; i++)
  224.       {
  225.       if(fprintf(fp, "\t%ld\t%ld\n", dinfo[i].lineno, dinfo[i].count) == EOF)
  226.       {
  227. --- 131,137 ----
  228.       free(dinfo);
  229.       return;
  230.       }
  231. !     for(i = 0; i < p->ncounts; i++)
  232.       {
  233.       if(fprintf(fp, "\t%ld\t%ld\n", dinfo[i].lineno, dinfo[i].count) == EOF)
  234.       {
  235. ***************
  236. *** 133,135 ****
  237. --- 144,275 ----
  238.       fclose(fp);
  239.       free(dinfo);
  240.   }
  241. + #else /* !OLD */
  242. + /* from GCC's libgcc2.c */
  243. + /* Return the number of digits needed to print a value */
  244. + /* __inline__ */ static int num_digits (long value, int base)
  245. + {
  246. +   int minus = (value < 0 && base != 16);
  247. +   unsigned long v = (minus) ? -value : value;
  248. +   int ret = minus;
  249. +   do
  250. +     {
  251. +       v /= base;
  252. +       ret++;
  253. +     }
  254. +   while (v);
  255. +   return ret;
  256. + }
  257. + static void
  258. + exit_func (void)
  259. + {
  260. +   FILE *file = fopen ("bb.out", "a");
  261. +   time_t time_value;
  262. +   if (!file)
  263. +     perror ("bb.out");
  264. +   else
  265. +     {
  266. +       struct bb *ptr;
  267. +       time (&time_value);
  268. +       fprintf (file, "Basic block profiling finished on %s\n", ctime (&time_value));
  269. +       /* We check the length field explicitly in order to allow compatibility
  270. +      with older GCC's which did not provide it.  */
  271. +       for (ptr = bb_head; ptr != (struct bb *) NULL; ptr = ptr->next)
  272. +     {
  273. +       int i;
  274. +       int func_p    = (ptr->nwords >= sizeof (struct bb) && ptr->nwords <= 1000);
  275. +       int line_p    = (func_p && ptr->line_nums);
  276. +       int file_p    = (func_p && ptr->filenames);
  277. +       long ncounts    = ptr->ncounts;
  278. +       long cnt_max  = 0;
  279. +       long line_max = 0;
  280. +       long addr_max = 0;
  281. +       int file_len    = 0;
  282. +       int func_len    = 0;
  283. +       int blk_len    = num_digits (ncounts, 10);
  284. +       int cnt_len;
  285. +       int line_len;
  286. +       int addr_len;
  287. +       fprintf (file, "File %s, %ld basic blocks \n\n",
  288. +            ptr->filename, ncounts);
  289. +       /* Get max values for each field.  */
  290. +       for (i = 0; i < ncounts; i++)
  291. +         {
  292. +           const char *p;
  293. +           int len;
  294. +           if (cnt_max < ptr->counts[i])
  295. +         cnt_max = ptr->counts[i];
  296. +           if (addr_max < ptr->addresses[i])
  297. +         addr_max = ptr->addresses[i];
  298. +           if (line_p && line_max < ptr->line_nums[i])
  299. +         line_max = ptr->line_nums[i];
  300. +           if (func_p)
  301. +         {
  302. +           p = (ptr->functions[i]) ? (ptr->functions[i]) : "<none>";
  303. +           len = strlen (p);
  304. +           if (func_len < len)
  305. +             func_len = len;
  306. +         }
  307. +           if (file_p)
  308. +         {
  309. +           p = (ptr->filenames[i]) ? (ptr->filenames[i]) : "<none>";
  310. +           len = strlen (p);
  311. +           if (file_len < len)
  312. +             file_len = len;
  313. +         }
  314. +         }
  315. +       addr_len = num_digits (addr_max, 16);
  316. +       cnt_len  = num_digits (cnt_max, 10);
  317. +       line_len = num_digits (line_max, 10);
  318. +       /* Now print out the basic block information.  */
  319. +       for (i = 0; i < ncounts; i++)
  320. +         {
  321. +           fprintf (file,
  322. +                "    Block #%*d: executed %*ld time(s) address= 0x%.*lx",
  323. +                blk_len, i+1,
  324. +                cnt_len, ptr->counts[i],
  325. +                addr_len, ptr->addresses[i]);
  326. +           if (func_p)
  327. +         fprintf (file, " function= %-*s", func_len,
  328. +              (ptr->functions[i]) ? ptr->functions[i] : "<none>");
  329. +           if (line_p)
  330. +         fprintf (file, " line= %*ld", line_len, ptr->line_nums[i]);
  331. +           if (file_p)
  332. +         fprintf (file, " file= %s",
  333. +              (ptr->filenames[i]) ? ptr->filenames[i] : "<none>");
  334. +           fprintf (file, "\n");
  335. +         }
  336. +       fprintf (file, "\n");
  337. +       fflush (file);
  338. +     }
  339. +       fprintf (file, "\n\n");
  340. +       fclose (file);
  341. +     }
  342. + }
  343. + #endif /* OLD */
  344. *** /dev/null    Sun Jan 16 03:52:52 1994
  345. --- buffindf.c    Sun Jan  9 04:37:54 1994
  346. ***************
  347. *** 0 ****
  348. --- 1,129 ----
  349. + /* _buffindfile: given a base filename, a list of directories, and a list
  350. +    of possible extensions to the filename, attempts to find a file.
  351. +    Useful for doing, e.g. spawnvp. Note that the current directory
  352. +    is always searched first! If the filename already contains a
  353. +    path specification (or extension) then the given path list
  354. +    (or extension list) is ignored.
  355. +    Returns the name by which the file was found, or NULL.
  356. +    Written by Eric R. Smith and placed in the public domain.
  357. +    rehacked by Uwe Ohse, 28.4.93, to support reentrant spawn/popen.
  358. +    19.12.93, Andreas Schwab, clean up namespace:
  359. +    - findfile moved to separate file
  360. +    - buffindfile renamed to _buffindfile
  361. + */
  362. + #include <compiler.h>
  363. + #include <support.h>
  364. + #include <stddef.h>
  365. + #include <types.h>
  366. + #include <stat.h>
  367. + #include <string.h>
  368. + /* characters used to separate components in a path list */
  369. + #define PATHSEP1        ':'
  370. + #define PATHSEP2        ','
  371. + /* characters used to separate directory names in a file */
  372. + #define DIRSEP1         '\\'    /* native OS directory separator */
  373. + #define DIRSEP2         '/'     /* for emulating another OS */
  374. + static char *const nullext[] = { NULL };
  375. + static int EXISTS __PROTO((const char *));
  376. + static int
  377. + EXISTS(name)
  378. +     const char *name;
  379. + {
  380. +     struct stat dummy;
  381. +     if (stat(name, &dummy) != 0)
  382. +         return 0;
  383. +     if ( (dummy.st_mode & S_IFMT) != S_IFREG )
  384. +         return 0;
  385. +     return 1;
  386. + }
  387. + char *
  388. + _buffindfile(fname, fpath, fext, try)
  389. +       const char *fname, *fpath;
  390. +       char *const *fext, *try;
  391. + {
  392. +       char *s, *extplace, *const *nextext, c;
  393. +       const char *t;
  394. +       int  hasext = 0, haspath = 0;
  395. +     if (!fname || !*fname)
  396. +         return NULL;
  397. +       s = try; t = fname;
  398. + /* copy the file in, checking to see if a path and/or extension are already
  399. +    given */
  400. +       while ( (c = *t++) != 0 )
  401. +       {
  402. +               if (c == DIRSEP1 || c == DIRSEP2)
  403. +               {
  404. +                       haspath = 1;
  405. +                       hasext = 0;
  406. +               }
  407. +               else if (c == '.')
  408. +                       hasext = 1;
  409. +               *s++ = c;
  410. +       }
  411. +       extplace = s;
  412. +       *s = 0;
  413. +       if (haspath || !fpath)
  414. +               fpath = "";
  415. +       if (hasext || !fext)
  416. +               fext = nullext;
  417. +       for(;;) {               /* loop on path elements */
  418. +               nextext = fext;
  419. +         if (!hasext) {
  420. +             extplace[0] = 0;
  421. +             extplace[1] = 0;
  422. +         }
  423. +         if (EXISTS(try))
  424. +             return try;
  425. +         extplace[0] = '.';
  426. +               while(*nextext) {       /* loop on extensions */
  427. +                       (void)strcpy(&extplace[1], *nextext++);
  428. +                       if (EXISTS(try))
  429. +                               return try;
  430. +               }
  431. +               if (!*fpath) break;  /* no more places to look */
  432. + /* copy in next element of path list */
  433. +               s = try;
  434. +         /* an attempt to accomodate within reason TOS specs  -- mj */
  435. +         if (*(fpath + 1) == ':') {
  436. +             if ((*(fpath + 2) == DIRSEP1 ||
  437. +                  *(fpath + 2) == DIRSEP2)   &&
  438. +                 (*fpath != '.' && *fpath != ':')) {
  439. +                 *s++ = *fpath++;
  440. +                 *s++ = *fpath++;
  441. +                 *s++ = *fpath++;
  442. +             }
  443. +         }
  444. +               while ((c = *fpath) != 0 && c != PATHSEP1 && c != PATHSEP2) {
  445. +                       *s++ = c;
  446. +                       fpath++;
  447. +               }
  448. +               if (c)
  449. +                       fpath++;
  450. +               *s++ = DIRSEP1;
  451. +               t = fname;
  452. +               while ((*s++ = *t++) != 0)
  453. +                       ;
  454. +               extplace = --s ;        /* where the extension gets written */
  455. +       }
  456. +       return NULL;
  457. + }
  458. *** 41.1    1993/11/03 13:33:02
  459. --- bzero.cpp    1993/12/01 20:44:42
  460. ***************
  461. *** 29,35 ****
  462. --- 29,37 ----
  463.       movl    sp@(12),d1    | length
  464.   #endif
  465.       jeq    exit        | length==0? (size_t)
  466. + #ifdef Lbzero
  467.       jra    do_set
  468. + #endif
  469.   #endif /* Lmemset */
  470.   
  471.   #ifdef Lbzero
  472. *** 41.1    1993/11/03 13:33:02
  473. --- fdopen.c    1994/01/13 09:37:10
  474. ***************
  475. *** 5,10 ****
  476. --- 5,12 ----
  477.   #include <unistd.h>
  478.   #include <errno.h>
  479.   
  480. + extern int __mint;
  481.   FILE *fdopen(h, mode)
  482.       register int h;
  483.       register const char *mode;
  484. ***************
  485. *** 59,65 ****
  486.           iomode |= O_RDWR;
  487.   
  488.       if(isatty(h))
  489. !         f |= (_IODEV | _IONBF);
  490.       else
  491.           f |= _IOFBF;
  492.       fp->_file = h;            /* file handle */
  493. --- 61,67 ----
  494.           iomode |= O_RDWR;
  495.   
  496.       if(isatty(h))
  497. !         f |= __mint ? (_IODEV | _IONBF | _IOBIN) : (_IODEV | _IONBF);
  498.       else
  499.           f |= _IOFBF;
  500.       fp->_file = h;            /* file handle */
  501. *** 41.1    1993/11/03 13:33:02
  502. --- findfile.c    1994/01/13 13:01:34
  503. ***************
  504. *** 1,137 ****
  505. - /* findfile: given a base filename, a list of directories, and a list
  506. -    of possible extensions to the filename, attempts to find a file.
  507. -    Useful for doing, e.g. spawnvp. Note that the current directory
  508. -    is always searched first! If the filename already contains a
  509. -    path specification (or extension) then the given path list
  510. -    (or extension list) is ignored.
  511. -    Returns the name by which the file was found, or NULL.
  512. -    Written by Eric R. Smith and placed in the public domain.
  513. -    rehacked by Uwe Ohse, 28.4.93, to support reentrant spawn/popen.
  514. - */
  515.   #include <compiler.h>
  516.   #include <limits.h>    /* needed for PATH_MAX */
  517.   #include <support.h>
  518. - #include <stddef.h>
  519. - #include <types.h>
  520. - #include <stat.h>
  521. - #include <string.h>
  522. - /* characters used to separate components in a path list */
  523. - #define PATHSEP1        ':'
  524. - #define PATHSEP2        ','
  525. - /* characters used to separate directory names in a file */
  526. - #define DIRSEP1         '\\'    /* native OS directory separator */
  527. - #define DIRSEP2         '/'     /* for emulating another OS */
  528. - static char *const nullext[] = { NULL };
  529.   
  530. - static int EXISTS __PROTO((const char *));
  531. - static int
  532. - EXISTS(name)
  533. -     const char *name;
  534. - {
  535. -     struct stat dummy;
  536. -     if (stat(name, &dummy) != 0)
  537. -         return 0;
  538. -     if ( (dummy.st_mode & S_IFMT) != S_IFREG )
  539. -         return 0;
  540. -     return 1;
  541. - }
  542.   char *
  543.   findfile(fname, fpath, fext)
  544.           const char *fname, *fpath;
  545.       char *const *fext;
  546.   {
  547. !       /* simply calls buffindfile */
  548.         static char try[PATH_MAX];
  549. !       return buffindfile(fname,fpath,fext,try);
  550. ! }
  551. ! char *
  552. ! buffindfile(fname, fpath, fext, try)
  553. !       const char *fname, *fpath;
  554. !       char *const *fext, *try;
  555. ! {
  556. !       char *s, *extplace, *const *nextext, c;
  557. !       const char *t;
  558. !       int  hasext = 0, haspath = 0;
  559. !     if (!fname || !*fname)
  560. !         return NULL;
  561. !       s = try; t = fname;
  562. ! /* copy the file in, checking to see if a path and/or extension are already
  563. !    given */
  564. !       while ( (c = *t++) != 0 )
  565. !       {
  566. !               if (c == DIRSEP1 || c == DIRSEP2)
  567. !               {
  568. !                       haspath = 1;
  569. !                       hasext = 0;
  570. !               }
  571. !               else if (c == '.')
  572. !                       hasext = 1;
  573. !               *s++ = c;
  574. !       }
  575. !       extplace = s;
  576. !       *s = 0;
  577. !       if (haspath || !fpath)
  578. !               fpath = "";
  579. !       if (hasext || !fext)
  580. !               fext = nullext;
  581. !       for(;;) {               /* loop on path elements */
  582. !               nextext = fext;
  583. !         if (!hasext) {
  584. !             extplace[0] = 0;
  585. !             extplace[1] = 0;
  586. !         }
  587. !         if (EXISTS(try))
  588. !             return try;
  589. !         extplace[0] = '.';
  590. !               while(*nextext) {       /* loop on extensions */
  591. !                       (void)strcpy(&extplace[1], *nextext++);
  592. !                       if (EXISTS(try))
  593. !                               return try;
  594. !               }
  595. !               if (!*fpath) break;  /* no more places to look */
  596. ! /* copy in next element of path list */
  597. !               s = try;
  598. !         /* an attempt to accomodate within reason TOS specs  -- mj */
  599. !         if (*(fpath + 1) == ':') {
  600. !             if ((*(fpath + 2) == DIRSEP1 ||
  601. !                  *(fpath + 2) == DIRSEP2)   &&
  602. !                 (*fpath != '.' && *fpath != ':')) {
  603. !                 *s++ = *fpath++;
  604. !                 *s++ = *fpath++;
  605. !                 *s++ = *fpath++;
  606. !             }
  607. !         }
  608. !               while ((c = *fpath) != 0 && c != PATHSEP1 && c != PATHSEP2) {
  609. !                       *s++ = c;
  610. !                       fpath++;
  611. !               }
  612. !               if (c)
  613. !                       fpath++;
  614. !               *s++ = DIRSEP1;
  615. !               t = fname;
  616. !               while ((*s++ = *t++) != 0)
  617. !                       ;
  618. !               extplace = --s ;        /* where the extension gets written */
  619. !       }
  620. !       return NULL;
  621.   }
  622. --- 1,13 ----
  623.   #include <compiler.h>
  624.   #include <limits.h>    /* needed for PATH_MAX */
  625.   #include <support.h>
  626.   
  627.   char *
  628.   findfile(fname, fpath, fext)
  629.           const char *fname, *fpath;
  630.       char *const *fext;
  631.   {
  632. !       /* simply calls _buffindfile */
  633.         static char try[PATH_MAX];
  634. !       return _buffindfile(fname,fpath,fext,try);
  635.   }
  636. *** 41.1    1993/11/03 13:33:02
  637. --- fopen.c    1994/01/09 11:11:58
  638. ***************
  639. *** 71,81 ****
  640.           return(NULL);        /* file open/create error */
  641.           }
  642.       if(isatty(h))
  643. !         f |= (_IODEV | _IOLBF);
  644.       else
  645.           f |= _IOFBF;
  646.       fp->_file = h;            /* file handle */
  647.       fp->_flag = f;            /* file status flags */
  648.   
  649.       return(fp);
  650.       }
  651. --- 71,83 ----
  652.           return(NULL);        /* file open/create error */
  653.           }
  654.       if(isatty(h))
  655. !         f |= __mint ? (_IODEV | _IONBF| _IOBIN) : (_IODEV | _IONBF);
  656.       else
  657.           f |= _IOFBF;
  658.       fp->_file = h;            /* file handle */
  659.       fp->_flag = f;            /* file status flags */
  660. +     if (iomode & O_APPEND)
  661. +         (void) fseek(fp, 0L, SEEK_END);
  662.   
  663.       return(fp);
  664.       }
  665. *** 41.1    1993/11/03 13:33:02
  666. --- getpw.c    1993/11/30 20:40:30
  667. ***************
  668. *** 382,392 ****
  669.       *cp++ = 0x00;
  670.       curentry.pw_dir = cp;
  671.       for (; ((*cp != 0x00) && (*cp != ':')); cp++)
  672. !       ;
  673.       *cp++ = 0x00;
  674.       curentry.pw_shell = cp;
  675.       for (; ((*cp != 0x00) && (*cp != ':') && (*cp != '\n')); cp++)
  676. !       ;
  677.       *cp = 0x00;
  678.       if (curentry.pw_age == NULL)
  679.         curentry.pw_age = cp; /* Don't return NULL, return a null string */
  680. --- 382,394 ----
  681.       *cp++ = 0x00;
  682.       curentry.pw_dir = cp;
  683.       for (; ((*cp != 0x00) && (*cp != ':')); cp++)
  684. !       if (*cp == '\\')
  685. !     *cp = '/';
  686.       *cp++ = 0x00;
  687.       curentry.pw_shell = cp;
  688.       for (; ((*cp != 0x00) && (*cp != ':') && (*cp != '\n')); cp++)
  689. !       if (*cp == '\\')
  690. !     *cp = '/';
  691.       *cp = 0x00;
  692.       if (curentry.pw_age == NULL)
  693.         curentry.pw_age = cp; /* Don't return NULL, return a null string */
  694. *** 41.1    1993/11/03 13:33:02
  695. --- lib.h    1993/11/30 18:49:56
  696. ***************
  697. *** 63,69 ****
  698.   __EXTERN void    _setstack    __PROTO((char *));
  699.   __EXTERN void    _crtinit    __PROTO((void));
  700.   __EXTERN void    _acc_main    __PROTO((void));
  701. ! __EXTERN __EXITING    __exit    __PROTO((long status));
  702.   
  703.   __EXTERN void    _fclose_all_files __PROTO((void));
  704.   /* from the TOS GCC library */
  705. --- 63,69 ----
  706.   __EXTERN void    _setstack    __PROTO((char *));
  707.   __EXTERN void    _crtinit    __PROTO((void));
  708.   __EXTERN void    _acc_main    __PROTO((void));
  709. ! __EXTERN __EXITING    __exit    __PROTO((long status)) __NORETURN;
  710.   
  711.   __EXTERN void    _fclose_all_files __PROTO((void));
  712.   /* from the TOS GCC library */
  713. *** 41.1    1993/11/03 13:33:02
  714. --- libgcc2.c    1993/11/30 18:50:02
  715. ***************
  716. *** 36,41 ****
  717. --- 36,46 ----
  718.   #include "gstddef.h"
  719.   #endif
  720.   
  721. + /* Don't use `fancy_abort' here even if config.h says to use it.  */
  722. + #ifdef abort
  723. + #undef abort
  724. + #endif
  725.   #else
  726.   
  727.   /* For the atari, include the relevant parts of config/m68k.h directly. */
  728. ***************
  729. *** 55,63 ****
  730.   #include <stddef.h>
  731.   #endif
  732.   
  733. ! /* Define this if most significant byte of a word is the lowest numbered.  */
  734. ! /* That is true on the 68000.  */
  735. ! #define BYTES_BIG_ENDIAN 1
  736.   
  737.   /* Define this if most significant word of a multiword number is the lowest
  738.      numbered.  */
  739. --- 60,77 ----
  740.   #include <stddef.h>
  741.   #endif
  742.   
  743. ! #if 1
  744. ! /* Define for XFmode extended real floating point support.  */
  745. ! #define LONG_DOUBLE_TYPE_SIZE 96
  746. ! #else
  747. ! /* Don't try using XFmode.  */
  748. ! #define LONG_DOUBLE_TYPE_SIZE 64
  749. ! #endif
  750. ! /* Define this if most significant bit is lowest numbered
  751. !    in instructions that operate on numbered bit-fields.
  752. !    This is true for 68020 insns such as bfins and bfexts.  */
  753. ! #define BITS_BIG_ENDIAN 1
  754.   
  755.   /* Define this if most significant word of a multiword number is the lowest
  756.      numbered.  */
  757. ***************
  758. *** 69,76 ****
  759.   /* number of bits in an addressable storage unit */
  760.   #define BITS_PER_UNIT 8
  761.   
  762. ! /* for this file this is always true, never compile anything in here with
  763. !    -mshort */
  764.   #define BITS_PER_WORD 32
  765.   
  766.   /* This is the library routine that is used
  767. --- 83,92 ----
  768.   /* number of bits in an addressable storage unit */
  769.   #define BITS_PER_UNIT 8
  770.   
  771. ! /* Width in bits of a "word", which is the contents of a machine register.
  772. !    Note that this is not necessarily the width of data type `int';
  773. !    if using 16-bit ints on a 68000, this would still be 32.
  774. !    But on a machine with 16-bit registers, this would be 16.  */
  775.   #define BITS_PER_WORD 32
  776.   
  777.   /* This is the library routine that is used
  778. ***************
  779. *** 172,177 ****
  780. --- 188,199 ----
  781.   
  782.   extern DItype __fixunssfdi (SFtype a);
  783.   extern DItype __fixunsdfdi (DFtype a);
  784. + #if LONG_DOUBLE_TYPE_SIZE == 96
  785. + extern DItype __fixunsxfdi (XFtype a);
  786. + #endif
  787. + #if LONG_DOUBLE_TYPE_SIZE == 128
  788. + extern DItype __fixunstfdi (TFtype a);
  789. + #endif
  790.   
  791.   #if defined (L_negdi2) || defined (L_divdi3) || defined (L_moddi3)
  792.   #if defined (L_divdi3) || defined (L_moddi3)
  793. ***************
  794. *** 697,702 ****
  795. --- 719,725 ----
  796.   
  797.   #ifdef L_divdi3
  798.   UDItype __udivmoddi4 ();
  799.   DItype
  800.   __divdi3 (u, v)
  801.        DItype u, v;
  802. ***************
  803. *** 1094,1100 ****
  804.   #endif
  805.   
  806.   #if defined(L_fixunsxfsi) && LONG_DOUBLE_TYPE_SIZE == 96
  807. ! #include "glimits.h"
  808.   
  809.   USItype
  810.   __fixunsxfsi (a)
  811. --- 1117,1123 ----
  812.   #endif
  813.   
  814.   #if defined(L_fixunsxfsi) && LONG_DOUBLE_TYPE_SIZE == 96
  815. ! #include <limits.h>
  816.   
  817.   USItype
  818.   __fixunsxfsi (a)
  819. ***************
  820. *** 1150,1162 ****
  821.   
  822.   /* frills for C++ */
  823.   
  824. ! #ifdef L_builtin_new
  825.   #include <memory.h>
  826.   
  827.   typedef void (*vfp)(void);
  828.   
  829.   extern vfp __new_handler;
  830.   
  831.   void *
  832.   __builtin_new (size_t sz)
  833.   {
  834. --- 1173,1186 ----
  835.   
  836.   /* frills for C++ */
  837.   
  838. ! #ifdef L_op_new
  839.   #include <memory.h>
  840.   
  841.   typedef void (*vfp)(void);
  842.   
  843.   extern vfp __new_handler;
  844.   
  845. + /* void * operator new (size_t sz) */
  846.   void *
  847.   __builtin_new (size_t sz)
  848.   {
  849. ***************
  850. *** 1170,1178 ****
  851.       (*__new_handler) ();
  852.     return p;
  853.   }
  854. ! #endif
  855.   
  856. ! #ifdef L_caps_New
  857.   
  858.     /* Avoid forcing the library's meaning of `write' on the user program
  859.        by using the "internal" name (for use within the library)  */
  860. --- 1194,1202 ----
  861.       (*__new_handler) ();
  862.     return p;
  863.   }
  864. ! #endif /* L_op_new */
  865.   
  866. ! #ifdef L_new_handler
  867.   
  868.     /* Avoid forcing the library's meaning of `write' on the user program
  869.        by using the "internal" name (for use within the library)  */
  870. ***************
  871. *** 1185,1215 ****
  872.   
  873.   vfp __new_handler = default_new_handler;
  874.   
  875. - void *
  876. - __builtin_vec_new (p, maxindex, size, ctor)
  877. -      void *p;
  878. -      size_t maxindex;
  879. -      size_t size;
  880. -      void (*ctor)(void *);
  881. - {
  882. -   size_t i;
  883. -   size_t nelts = maxindex + 1;
  884. -   void *rval;
  885. -   if (p == 0)
  886. -     p = __builtin_new (nelts * size);
  887. -   rval = p;
  888. -   for (i = 0; i < nelts; i++)
  889. -     {
  890. -       (*ctor) (p);
  891. -       p += size;
  892. -     }
  893. -   return rval;
  894. - }
  895.   vfp
  896.   __set_new_handler (handler)
  897.        vfp handler;
  898. --- 1209,1214 ----
  899. ***************
  900. *** 1243,1283 ****
  901.     _exit (-1);
  902.   }
  903.   #endif
  904. - #ifdef L_builtin_del
  905. - typedef void (*vfp)(void);
  906.   
  907.   void
  908.   __builtin_delete (void *ptr)
  909.   {
  910.     if (ptr)
  911.       free (ptr);
  912.   }
  913. - void
  914. - __builtin_vec_delete (ptr, maxindex, size, dtor, auto_delete_vec, auto_delete)
  915. -      void *ptr;
  916. -      size_t maxindex;
  917. -      size_t size;
  918. -      void (*dtor)(void *, int);
  919. -      int auto_delete;
  920. - {
  921. -   size_t i;
  922. -   size_t nelts = maxindex + 1;
  923. -   void *p = ptr;
  924. -   ptr += nelts * size;
  925. -   for (i = 0; i < nelts; i++)
  926. -     {
  927. -       ptr -= size;
  928. -       (*dtor) (ptr, auto_delete);
  929. -     }
  930. -   if (auto_delete_vec)
  931. -     __builtin_delete (p);
  932. - }
  933.   #endif
  934.   
  935.   #ifdef L_trampoline
  936. --- 1242,1256 ----
  937.     _exit (-1);
  938.   }
  939.   #endif
  940.   
  941. + #ifdef L_op_delete
  942. + /* void operator delete (void *ptr) */
  943.   void
  944.   __builtin_delete (void *ptr)
  945.   {
  946.     if (ptr)
  947.       free (ptr);
  948.   }
  949.   #endif
  950.   
  951.   #ifdef L_trampoline
  952. *** 41.1    1993/11/03 13:33:02
  953. --- longlong.h    1993/11/30 18:50:08
  954. ***************
  955. *** 411,443 ****
  956.          : "=d" ((USItype)(count))                    \
  957.          : "od" ((USItype)(x)), "n" (0))
  958.   #else /* not mc68020 */
  959.   #define umul_ppmm(xh, xl, a, b) \
  960.     __asm__ ("| Inlined umul_ppmm
  961. !     movel    %2,d0
  962. !     movel    %3,d1
  963. !     movel    d0,d2
  964. !     swap    d0
  965. !     movel    d1,d3
  966. !     swap    d1
  967. !     movew    d2,d4
  968. !     mulu    d3,d4
  969. !     mulu    d1,d2
  970. !     mulu    d0,d3
  971. !     mulu    d0,d1
  972. !     movel    d4,d0
  973. !     eorw    d0,d0
  974. !     swap    d0
  975. !     addl    d0,d2
  976. !     addl    d3,d2
  977.       jcc    1f
  978. !     addl    #65536,d1
  979. ! 1:    swap    d2
  980. !     moveq    #0,d0
  981. !     movew    d2,d0
  982. !     movew    d4,d2
  983. !     movel    d2,%1
  984. !     addl    d1,d0
  985. !     movel    d0,%0"                            \
  986.          : "=g" ((USItype)(xh)),                    \
  987.            "=g" ((USItype)(xl))                    \
  988.          : "g" ((USItype)(a)),                    \
  989. --- 411,444 ----
  990.          : "=d" ((USItype)(count))                    \
  991.          : "od" ((USItype)(x)), "n" (0))
  992.   #else /* not mc68020 */
  993. + /* %/ inserts REGISTER_PREFIX.  */
  994.   #define umul_ppmm(xh, xl, a, b) \
  995.     __asm__ ("| Inlined umul_ppmm
  996. !     movel    %2,%/d0
  997. !     movel    %3,%/d1
  998. !     movel    %/d0,%/d2
  999. !     swap    %/d0
  1000. !     movel    %/d1,%/d3
  1001. !     swap    %/d1
  1002. !     movew    %/d2,%/d4
  1003. !     mulu    %/d3,%/d4
  1004. !     mulu    %/d1,%/d2
  1005. !     mulu    %/d0,%/d3
  1006. !     mulu    %/d0,%/d1
  1007. !     movel    %/d4,%/d0
  1008. !     eorw    %/d0,%/d0
  1009. !     swap    %/d0
  1010. !     addl    %/d0,%/d2
  1011. !     addl    %/d3,%/d2
  1012.       jcc    1f
  1013. !     addl    #65536,%/d1
  1014. ! 1:    swap    %/d2
  1015. !     moveq    #0,%/d0
  1016. !     movew    %/d2,%/d0
  1017. !     movew    %/d4,%/d2
  1018. !     movel    %/d2,%1
  1019. !     addl    %/d1,%/d0
  1020. !     movel    %/d0,%0"                        \
  1021.          : "=g" ((USItype)(xh)),                    \
  1022.            "=g" ((USItype)(xl))                    \
  1023.          : "g" ((USItype)(a)),                    \
  1024. *** 41.1    1993/11/03 13:33:02
  1025. --- strerror.c    1993/11/24 21:14:28
  1026. ***************
  1027. *** 118,124 ****
  1028.   
  1029.   /* Support for Kay Roemer's socket library */
  1030.   
  1031. ! char *_sock_errlist[] = {
  1032.       "Socket operation on non-socket",        /* 300 */
  1033.       "Destination address required",
  1034.       "Message too long",
  1035. --- 118,124 ----
  1036.   
  1037.   /* Support for Kay Roemer's socket library */
  1038.   
  1039. ! char *const _sock_errlist[] = {
  1040.       "Socket operation on non-socket",        /* 300 */
  1041.       "Destination address required",
  1042.       "Message too long",
  1043. *** 41.1    1993/11/03 13:33:02
  1044. --- Bugs    1994/01/09 11:14:24
  1045. ***************
  1046. *** 70,78 ****
  1047.     change only CLOCKS_PER_SEC.  CLK_TCK is used in times.c.  CLOCKS_PER_SEC
  1048.     is used in sleep.c.
  1049.   
  1050. - close.c, open.c: ++nox
  1051. -   close(0); open (...);  doesn't reopen 0 (stdin).  (or does it now?)
  1052.   crtinit.c: ++nox
  1053.     Some programs like uuxqt (taylors at least) understand exit code
  1054.     EX_TEMPFAIL (75) to mean retry the command (uux job) later.  Now when
  1055. --- 70,75 ----
  1056. ***************
  1057. *** 122,127 ****
  1058. --- 119,128 ----
  1059.     [I disagree, limits.h should be strictly ANSI and is already polluted
  1060.     as it is -entropy]
  1061.   
  1062. + link.c: ++nox
  1063. +   link() returns the same error code for different things i.e. EACCESS when
  1064. +   it really means EEXIST.
  1065.   localtim.c: ++nox
  1066.     Fix localtime() etc. to get the start/end DST rules from $TZ...
  1067.   
  1068. ***************
  1069. *** 149,154 ****
  1070. --- 150,160 ----
  1071.   open.c: ++nox
  1072.     Should open() do a TIOCSPGRP too when it Fforces the control tty?
  1073.     I think, but i'm not 100% sure...
  1074. +   Currently errno is set to EPATH (ENOTDIR) in some cases where UNIX would
  1075. +   give EFILNF (ENOENT).  The GEMDOS error codes should be translated by the
  1076. +   library in these cases.  This affects open() and creat(), and possibly
  1077. +   other functions as well (check access(),  unlink(), mkdir(), anything that
  1078. +   accesses files by name).
  1079.   
  1080.   pgrp.c: ++entropy
  1081.     The setsid() function never really disassociates the controlling tty from
  1082. ***************
  1083. *** 215,220 ****
  1084. --- 221,231 ----
  1085.     I'll accept it so long as there is a way (via an environment variable)
  1086.     for the user to select the emulation as it is currently working.  Fixes
  1087.     to make the emulation more robust would also be welcome. -entropy]
  1088. + thread.c: ++nox
  1089. +   tfork() doesn't know about -mbaserel, had to save a4 (base pointer)
  1090. +   myself for the child.  (and all this only because we still don't have a
  1091. +   real vfork...)
  1092.   
  1093.   types.h: ++entropy
  1094.     Need ssize_t for POSIX compliance.
  1095. *** 41.1    1993/11/03 13:33:02
  1096. --- Changelog    1994/01/16 08:44:06
  1097. ***************
  1098. *** 4,9 ****
  1099. --- 4,391 ----
  1100.   Changes are listed in *reverse* order, most recent changes being
  1101.   first.
  1102.   
  1103. + PATCHLEVEL42::
  1104. + ***** abs.c
  1105. + ----------------------------
  1106. + revision 41.2    
  1107. + date: 1993/11/24 20:23:16;  author: pvt1-117;  state: Exp;  lines: +7 -0
  1108. + Inline abs() and labs() for LCC.
  1109. + =============================================================================
  1110. + ***** bblink.c
  1111. + ----------------------------
  1112. + revision 41.3    
  1113. + date: 1994/01/13 08:03:50;  author: schwab;  state: Exp;  lines: +29 -26
  1114. + Fixed version of update for GCC 2.5
  1115. + ----------------------------
  1116. + revision 41.2
  1117. + date: 1993/11/30 18:51:36;  author: schwab;  state: Exp;  lines: +139 -2
  1118. + Updated for GCC 2.5
  1119. + =============================================================================
  1120. + ***** buffindf.c
  1121. + ----------------------------
  1122. + revision 41.2    
  1123. + date: 1994/01/09 09:33:20;  author: schwab;  state: Exp;
  1124. + NEW file.
  1125. + The library uses the names findfile and buffindfile which are in the
  1126. + user's namespace. findfile is not really used and should be move into
  1127. + a separate file, and buffindfile should be renamed to _buffindfile.
  1128. + I have renamed findfile.c to buffindf.c and moved the function
  1129. + findfile into a new findfile.c, and changed all callers.
  1130. + =============================================================================
  1131. + ***** bzero.cpp
  1132. + ----------------------------
  1133. + revision 41.2    
  1134. + date: 1993/12/01 20:45:46;  author: michal;  state: Exp;  lines: +2 -0
  1135. + When Lmemset is defined and not Lbzero, the jump at the bottom
  1136. + of the memset setup reduces to a zero offset jump. put a
  1137. + #ifdef Lbzero (which amounts to  really #ifdef Lmemset && Lbzero)
  1138. + around the `jra do_set'.
  1139. + =============================================================================
  1140. + ***** fdopen.c
  1141. + ----------------------------
  1142. + revision 41.3    
  1143. + date: 1994/01/13 09:37:36;  author: entropy;  state: Exp;  lines: +2 -0
  1144. + *** empty log message ***
  1145. + ----------------------------
  1146. + revision 41.2
  1147. + date: 1993/11/24 20:12:04;  author: nox;  state: Exp;  lines: +1 -1
  1148. + Use binary mode on tty's (under MiNT) to avoid extra ^M's.
  1149. + =============================================================================
  1150. + ***** findfile.c
  1151. + ----------------------------
  1152. + revision 41.2    
  1153. + date: 1994/01/09 09:29:32;  author: schwab;  state: Exp;  lines: +2 -126
  1154. + The library uses the names findfile and buffindfile which are in the
  1155. + user's namespace. findfile is not really used and should be moved into
  1156. + a separate file, and buffindfile should be renamed to _buffindfile.
  1157. + I have renamed findfile.c to buffindf.c and moved the function
  1158. + findfile into the new findfile.c, and changed all callers.
  1159. + =============================================================================
  1160. + ***** fopen.c
  1161. + ----------------------------
  1162. + revision 41.4    
  1163. + date: 1994/01/09 11:12:06;  author: nox;  state: Exp;  lines: +2 -2
  1164. + *** empty log message ***
  1165. + ----------------------------
  1166. + revision 41.3
  1167. + date: 1994/01/09 11:06:16;  author: nox;  state: Exp;  lines: +2 -0
  1168. + In _fopen() we seek to the end when file mode "a" is used (the kernel
  1169. + won't do this until the first write.)
  1170. + ----------------------------
  1171. + revision 41.2
  1172. + date: 1993/11/24 20:12:34;  author: nox;  state: Exp;  lines: +1 -1
  1173. + Use binary mode on tty's (under MiNT) to avoid extra ^M's.
  1174. + =============================================================================
  1175. + ***** getpw.c
  1176. + ----------------------------
  1177. + revision 41.2    
  1178. + date: 1993/11/30 20:40:50;  author: nox;  state: Exp;  lines: +4 -2
  1179. + Convert backslashes in the home directory in the passwd file, for backwards
  1180. + compatibility.
  1181. + =============================================================================
  1182. + ***** lib.h
  1183. + ----------------------------
  1184. + revision 41.2    
  1185. + date: 1993/11/30 18:51:48;  author: schwab;  state: Exp;  lines: +1 -1
  1186. + Use new way to declare a function that doesn't return, since
  1187. + the old way wasn't ANSI conforming.
  1188. + =============================================================================
  1189. + ***** libgcc2.c
  1190. + ----------------------------
  1191. + revision 41.2    
  1192. + date: 1993/11/30 18:51:58;  author: schwab;  state: Exp;  lines: +35 -62
  1193. + New entry points: L_builtin_new, L_caps_New and L_builtin_del are replaced
  1194. + by L_op_new, L_new_handler and L_op_delete.
  1195. + =============================================================================
  1196. + ***** longlong.h
  1197. + ----------------------------
  1198. + revision 41.2    
  1199. + date: 1993/11/30 18:52:22;  author: schwab;  state: Exp;  lines: +25 -24
  1200. + Updated for GCC 2.5
  1201. + =============================================================================
  1202. + ***** strerror.c
  1203. + ----------------------------
  1204. + revision 41.2    
  1205. + date: 1993/11/24 21:14:58;  author: schwab;  state: Exp;  lines: +1 -1
  1206. + Move _sock_errlist[] into the text segment by making it const, so that
  1207. + -mbaserel works again.
  1208. + =============================================================================
  1209. + ***** include/PatchLev.h
  1210. + ----------------------------
  1211. + revision 41.3    
  1212. + date: 1993/11/04 03:26:16;  author: entropy;  state: Exp;  lines: +0 -0
  1213. + -
  1214. + ----------------------------
  1215. + revision 41.2
  1216. + date: 1993/11/03 14:25:10;  author: entropy;  state: Exp;  lines: +1 -1
  1217. + -
  1218. + =============================================================================
  1219. + ***** include/assert.h
  1220. + ----------------------------
  1221. + revision 41.3    
  1222. + date: 1994/01/09 09:02:56;  author: lux;  state: Exp;  lines: +4 -13
  1223. + Make assert() macro more ANSI compliant by replacing the broken assert()
  1224. + macro with what was previously given as assertval(), and remove
  1225. + the assertval() macro.
  1226. + ----------------------------
  1227. + revision 41.2
  1228. + date: 1993/11/30 18:50:46;  author: schwab;  state: Exp;  lines: +1 -1
  1229. + Use new way to declare a function that doesn't return, since
  1230. + the old way wasn't ANSI conforming.
  1231. + =============================================================================
  1232. + ***** include/compiler.h
  1233. + ----------------------------
  1234. + revision 41.2    
  1235. + date: 1993/11/30 18:50:50;  author: schwab;  state: Exp;  lines: +10 -0
  1236. + Use new way to declare a function that doesn't return, since
  1237. + the old way wasn't ANSI conforming.
  1238. + =============================================================================
  1239. + ***** include/gdbm.h
  1240. + ----------------------------
  1241. + revision 41.2    
  1242. + date: 1993/12/01 20:42:48;  author: jrb;  state: Exp;  lines: +99 -21
  1243. + Synchronize with update36.
  1244. + =============================================================================
  1245. + ***** include/ioctl.h
  1246. + ----------------------------
  1247. + revision 41.2    
  1248. + date: 1993/11/24 21:09:20;  author: schwab;  state: Exp;  lines: +1 -0
  1249. + Add definition of B134.
  1250. + =============================================================================
  1251. + ***** include/math-68881.h
  1252. + ----------------------------
  1253. + revision 41.2    
  1254. + date: 1993/11/30 18:50:58;  author: schwab;  state: Exp;  lines: +112 -48
  1255. + Give inline functions const attribute instead of declaring as const.
  1256. + Fix a bug in atan2 where the function from libpml gives a different result
  1257. + on the arguments (0, -1).
  1258. + =============================================================================
  1259. + ***** include/math.h
  1260. + ----------------------------
  1261. + revision 41.2    
  1262. + date: 1993/11/24 20:08:46;  author: jrb;  state: Exp;  lines: +28 -24
  1263. + allow define NO_INLINE_MATH to override _M68881_. Also, check
  1264. + for __GNUC_INLINE__ as a pre-requisite to inlining (so the  user
  1265. + may override globally with  __NO_INLINE__.
  1266. + =============================================================================
  1267. + ***** include/minimal.h
  1268. + ----------------------------
  1269. + revision 41.2    
  1270. + date: 1993/11/30 18:51:10;  author: schwab;  state: Exp;  lines: +4 -3
  1271. + Use new way to declare a function that doesn't return, since
  1272. + the old way wasn't ANSI conforming.
  1273. + =============================================================================
  1274. + ***** include/mintbind.h
  1275. + ----------------------------
  1276. + revision 41.3    
  1277. + date: 1994/01/09 10:01:00;  author: pvt1-117;  state: Exp;  lines: +1 -1
  1278. + Some changes for Lattice C.
  1279. + ----------------------------
  1280. + revision 41.2
  1281. + date: 1993/11/24 20:50:10;  author: hohmuth;  state: Exp;  lines: +1 -1
  1282. + Fix return type of Pwaitpid() for Pure C.
  1283. + =============================================================================
  1284. + ***** include/osbind.h
  1285. + ----------------------------
  1286. + revision 41.2    
  1287. + date: 1994/01/09 10:01:28;  author: pvt1-117;  state: Exp;  lines: +3 -3
  1288. + Some changes for Lattice C.
  1289. + =============================================================================
  1290. + ***** include/stdlib.h
  1291. + ----------------------------
  1292. + revision 41.3    
  1293. + date: 1993/11/30 18:51:16;  author: schwab;  state: Exp;  lines: +3 -3
  1294. + Use new way to declare a function that doesn't return, since
  1295. + the old way wasn't ANSI conforming.
  1296. + ----------------------------
  1297. + revision 41.2
  1298. + date: 1993/11/24 20:20:46;  author: pvt1-117;  state: Exp;  lines: +10 -0
  1299. + Inline abs() and labs() for LCC.
  1300. + =============================================================================
  1301. + ***** include/support.h
  1302. + ----------------------------
  1303. + revision 41.3    
  1304. + date: 1994/01/09 09:28:44;  author: schwab;  state: Exp;  lines: +1 -1
  1305. + Rename buffindfile() to _buffindfile().
  1306. + ----------------------------
  1307. + revision 41.2
  1308. + date: 1993/11/30 18:51:22;  author: schwab;  state: Exp;  lines: +2 -2
  1309. + Use new way to declare a function that doesn't return, since
  1310. + the old way wasn't ANSI conforming.
  1311. + =============================================================================
  1312. + ***** include/termios.h
  1313. + ----------------------------
  1314. + revision 41.2    
  1315. + date: 1993/11/24 21:10:38;  author: schwab;  state: Exp;  lines: +1 -0
  1316. + Add definition of B134.
  1317. + =============================================================================
  1318. + ***** include/unistd.h
  1319. + ----------------------------
  1320. + revision 41.2    
  1321. + date: 1993/11/30 18:51:28;  author: schwab;  state: Exp;  lines: +1 -1
  1322. + Use new way to declare a function that doesn't return, since
  1323. + the old way wasn't ANSI conforming.
  1324. + =============================================================================
  1325. + ***** dup.c
  1326. + ----------------------------
  1327. + revision 41.2    
  1328. + date: 1994/01/09 10:31:12;  author: roemer;  state: Exp;  lines: +3 -1
  1329. + Make dup2(x, x) return x without doing anything, instead of failing.
  1330. + [I also removed the "close(handle2);" since this violates POSIX and
  1331. + the Fforce() already closes the target handle for us -entropy]
  1332. + =============================================================================
  1333. + ***** execp.c
  1334. + ----------------------------
  1335. + revision 41.2    
  1336. + date: 1994/01/09 09:28:56;  author: schwab;  state: Exp;  lines: +1 -1
  1337. + Rename buffindfile() to _buffindfile().
  1338. + =============================================================================
  1339. + ***** fopenp.c
  1340. + ----------------------------
  1341. + revision 41.2    
  1342. + date: 1994/01/09 09:29:04;  author: schwab;  state: Exp;  lines: +1 -1
  1343. + Rename buffindfile() to _buffindfile().
  1344. + =============================================================================
  1345. + ***** main.c
  1346. + ----------------------------
  1347. + revision 41.4    
  1348. + date: 1994/01/09 10:15:48;  author: dsb;  state: Exp;  lines: +32 -30
  1349. + Cast malloc() calls for HSC.
  1350. + ----------------------------
  1351. + revision 41.3
  1352. + date: 1994/01/09 09:11:18;  author: dirk_haun;  state: Exp;  lines: +2 -2
  1353. + Some time ago, I reported a bug in main.c of MiNT lib PL39, which destroys
  1354. + long PATH enviroment variables. Unfortunately, the bugfix itself was buggy
  1355. + :-( If PATH consisted only of a null byte, followed by the root directory of
  1356. + the boot drive, the result was garbage.  E.g. PATH=\0C:\\ resulted in
  1357. + PATH=/dev/c/nvurhgb so we allow for a size increase of up to five times the
  1358. + original instead of four.
  1359. + ----------------------------
  1360. + revision 41.2
  1361. + date: 1993/11/24 20:35:52;  author: dirk_haun;  state: Exp;  lines: +2 -2
  1362. + _path_dos2unx enlarges the path by at most *four* times the number of
  1363. + elements, not two (with the old code, ";C:\;C:\CMD;E:\METAFONT" becomes
  1364. + ":/dev/c/:/dev/c/cmd:/dev/e/meta".
  1365. + =============================================================================
  1366. + ***** mincl
  1367. + ----------------------------
  1368. + revision 41.3    
  1369. + date: 1994/01/09 11:15:20;  author: entropy;  state: Exp;  lines: +1 -1
  1370. + *** empty log message ***
  1371. + ----------------------------
  1372. + revision 41.2
  1373. + date: 1993/11/30 18:52:44;  author: schwab;  state: Exp;  lines: +2 -2
  1374. + Add new libgcc2 targets.
  1375. + =============================================================================
  1376. + ***** open.c
  1377. + ----------------------------
  1378. + revision 41.2    
  1379. + date: 1994/01/09 10:47:04;  author: roemer;  state: Exp;  lines: +3 -2
  1380. + O_EXCL was being used incorrectly.  It is only used in relation to
  1381. + O_CREAT and has nothing to do with file sharing modes.  So we add
  1382. + it to modemask (allowing it to be passed through to Fopen()) and always
  1383. + use O_DENYNONE.
  1384. + =============================================================================
  1385. + ***** scanf.c
  1386. + ----------------------------
  1387. + revision 41.2    
  1388. + date: 1994/01/09 09:56:18;  author: schab;  state: Exp;  lines: +230 -182
  1389. + The patch corrects these two bugs:
  1390. + - sscanf ("1", "%d%n", &i, &n) fails to set n, generally the value was
  1391. + off-by-one in the other cases
  1392. + - sscanf ("0x10", "%x", &i) sets i to 0 instead of 16
  1393. + Additionally i have implemented %p and %Lf (the latter only for
  1394. + M68881, since there is no long double support without fpu yet), and i
  1395. + have restructured the code to make it more efficient.
  1396. + =============================================================================
  1397. + ***** spawn.c
  1398. + ----------------------------
  1399. + revision 41.3    
  1400. + date: 1994/01/09 09:29:10;  author: schwab;  state: Exp;  lines: +1 -1
  1401. + Rename buffindfile() to _buffindfile().
  1402. + ----------------------------
  1403. + revision 41.2
  1404. + date: 1993/11/24 21:06:22;  author: schwab;  state: Exp;  lines: +8 -5
  1405. + When running the interpreter for a script, the full pathname of the
  1406. + script should be passed, and not only the string from argv[0]. The
  1407. + latter normally does not include a path if the script was found
  1408. + through $PATH.
  1409. + =============================================================================
  1410. + ***** spawnvp.c
  1411. + ----------------------------
  1412. + revision 41.2    
  1413. + date: 1994/01/09 09:29:24;  author: schwab;  state: Exp;  lines: +1 -1
  1414. + Rename buffindfile() to _buffindfile().
  1415. + =============================================================================
  1416. + ***** sync.c
  1417. + ----------------------------
  1418. + revision 41.2    
  1419. + date: 1994/01/09 09:52:04;  author: schwab;  state: Exp;  lines: +9 -1
  1420. + fsync() uses the value from st_dev in the stat structure to form a
  1421. + pathname for Dcntl. This value can be > 0x100 for filesystems mounted
  1422. + via FS_MOUNT. Currently there is no way to sync such a filesystem, i
  1423. + have changed fsync to just return successfully in this case.
  1424. + =============================================================================
  1425. + ***** tcattr.c
  1426. + ----------------------------
  1427. + revision 41.2    
  1428. + date: 1993/11/24 21:11:36;  author: schwab;  state: Exp;  lines: +4 -5
  1429. + Make better mappings between termios attributes and real attributes,
  1430. + and fix typos.
  1431. + =============================================================================
  1432. + ***** thread.c
  1433. + ----------------------------
  1434. + revision 41.3    
  1435. + date: 1994/01/09 18:13:30;  author: entropy;  state: Exp;  lines: +21 -0
  1436. + entropy's attempt at implementing nox's idea for getting tfork() to
  1437. + work with -mbaserel.  Untested.
  1438. + ----------------------------
  1439. + revision 41.2
  1440. + date: 1994/01/09 09:49:06;  author: schwab;  state: Exp;  lines: +2 -2
  1441. + This patch for MiNTlib PL41 fixes the memory leak. It just moves the
  1442. + calls to Mfree to the right place.
  1443. + =============================================================================
  1444. + ***** unx2dos.c
  1445. + ----------------------------
  1446. + revision 41.2    
  1447. + date: 1994/01/09 09:46:10;  author: schwab;  state: Exp;  lines: +6 -4
  1448. + When given an empty path, _path_unx2dos/_path_dos2unx trash the byte
  1449. + before the supplied buffer. This can be seen by executing
  1450. + PATH= printenv
  1451. + (under sh or bash), there will be a line beginning with "PATH", but no
  1452. + equal sign and probably some garbage behind.
  1453. + =============================================================================
  1454. + ***** crlf/crlf.c
  1455. + ----------------------------
  1456. + revision 41.3    
  1457. + date: 1994/01/09 14:38:22;  author: entropy;  state: Exp;  lines: +386 -386
  1458. + *** empty log message ***
  1459. + ----------------------------
  1460. + revision 41.2
  1461. + date: 1994/01/09 14:35:58;  author: entropy;  state: Exp;  lines: +386 -296
  1462. + Merged changes from Markus Kilbinger and Martin Koehling.
  1463. + =============================================================================
  1464. + ***** crlf/crlf.doc
  1465. + ----------------------------
  1466. + revision 41.2    
  1467. + date: 1994/01/09 14:40:52;  author: entropy;  state: Exp;  lines: +7 -3
  1468. + *** empty log message ***
  1469. + =============================================================================
  1470. + ***** crlf/crlf.ttp
  1471. + ----------------------------
  1472. + revision 41.2    
  1473. + date: 1994/01/09 14:42:16;  author: entropy;  state: Exp;  lines: +276 -271
  1474. + *** empty log message ***
  1475. + =============================================================================
  1476. + ***** crlf/makefile
  1477. + ----------------------------
  1478. + revision 41.2    
  1479. + date: 1994/01/09 14:42:46;  author: entropy;  state: Exp;  lines: +1 -3
  1480. + *** empty log message ***
  1481. + =============================================================================
  1482.   PATCHLEVEL41::
  1483.   
  1484.   ***** nlist.c
  1485. *** 41.1    1993/11/03 13:33:02
  1486. --- Files    1994/01/09 09:41:32
  1487. ***************
  1488. *** 7,40 ****
  1489.   _normsf.cpp   _truncdf.cpp  _udivmod.s      _umulsi3.s    a64l.c \
  1490.   abort.c          abs.c        access.c      alglobal.c    alloca.cpp \
  1491.   alphasor.c    atof.c        atol.c      bblink.c    bcmp.c \
  1492. ! bcopy.cpp     binmode.c        bsearch.c      bzero.cpp    calloc.c \
  1493. ! chdir.c          chmod.c        ctermid.c      ctime.c    ctype.c \
  1494. ! cuserid.c     defmode.c        difftime.c      div.c        div.cpp \
  1495. ! doprnt.c      eprintf.c        errbase.h      fclose.c    fdopen.c \
  1496. ! fflush.c      ffs.c        fgetc.c      fgets.c    filbuf.c \
  1497. ! findfile.c    flonum.h        fopen.c      fprintf.c    fputc.c \
  1498. ! fputs.c          fread.c        frexp.cpp      frwbin.c    fseek.c \
  1499. ! fsetpos.c     ftw.c        fungetc.c      fwrite.c    gbl-ctors.h \
  1500. ! getbuf.c      getenv.c        getlogin.c      getopt.c    getpass.c \
  1501. ! getpid.c      getpw.c        gets.c      getuid.c    getw.c \
  1502. ! gmon.c          gnulib2.c        grp.c      ic.c        ig.c \
  1503. ! il.c          ip.c        iw.c      ldexp.cpp    lib.h \
  1504. ! libgcc1.c     libgcc2.c        linea.c      localtim.c    longlong.h \
  1505. ! lseek.c          ltoa.c        malloc.c      memccpy.c    memchr.c \
  1506. ! memcmp.c      mktemp.c        modf.cpp      nlist.c    obstack.c \
  1507. ! perror.c      pgrp.c        printf.c      psignal.c    putenv.c \
  1508. ! qsort.c          raise.c        rand.c      random.c    realloc.c \
  1509. ! regexp.c      regsup.c        sbrk.c      setbuf.c    setjmp.cpp \
  1510. ! setlocal.c    setvbuf.c        sgtty.c      siglist.c    sprintf.c \
  1511. ! stksiz.c      strcat.c        strchr.c      strcmp.c    strcoll.c \
  1512. ! strcpy.c      strcspn.c        strdup.c      strerror.c    strftime.c \
  1513. ! stricmp.c     strlen.c        strlwr.c      strncat.c    strncmp.c \
  1514. ! strncpy.c     strnicmp.c    strpbrk.c      strrchr.c    strrev.c \
  1515. ! strspn.c      strstr.c        strtok.c      strtol.c    strtoul.c \
  1516. ! strupr.c      system.c        sysvar.c      textio.c    time.c \
  1517. ! timeoday.c    tmpfile.c        tmpnam.c      toxxx.c    utime.c \
  1518. ! vfprintf.c    vprintf.c        wcmb.c      wcscat.c    wcscmp.c \
  1519. ! wcscpy.c      wcslen.c        wnull.c \
  1520.   
  1521.   MINTLIB= \
  1522.   GMakefile.16  GMakefile.32  GNUGPL2      Makefile    alarm.c \
  1523. --- 7,40 ----
  1524.   _normsf.cpp   _truncdf.cpp  _udivmod.s      _umulsi3.s    a64l.c \
  1525.   abort.c          abs.c        access.c      alglobal.c    alloca.cpp \
  1526.   alphasor.c    atof.c        atol.c      bblink.c    bcmp.c \
  1527. ! bcopy.cpp     binmode.c        bsearch.c      buffindf.c    bzero.cpp \
  1528. ! calloc.c      chdir.c        chmod.c      ctermid.c    ctime.c \
  1529. ! ctype.c          cuserid.c        defmode.c      difftime.c    div.c \
  1530. ! div.cpp          doprnt.c        eprintf.c      errbase.h    fclose.c \
  1531. ! fdopen.c      fflush.c        ffs.c      fgetc.c    fgets.c \
  1532. ! filbuf.c      findfile.c    flonum.h      fopen.c    fprintf.c \
  1533. ! fputc.c          fputs.c        fread.c      frexp.cpp    frwbin.c \
  1534. ! fseek.c          fsetpos.c        ftw.c      fungetc.c    fwrite.c \
  1535. ! gbl-ctors.h   getbuf.c        getenv.c      getlogin.c    getopt.c \
  1536. ! getpass.c     getpid.c        getpw.c      gets.c    getuid.c \
  1537. ! getw.c          gmon.c        gnulib2.c      grp.c        ic.c \
  1538. ! ig.c          il.c        ip.c      iw.c        ldexp.cpp \
  1539. ! lib.h          libgcc1.c        libgcc2.c      linea.c    localtim.c \
  1540. ! longlong.h    lseek.c        ltoa.c      malloc.c    memccpy.c \
  1541. ! memchr.c      memcmp.c        mktemp.c      modf.cpp    nlist.c \
  1542. ! obstack.c     perror.c        pgrp.c      printf.c    psignal.c \
  1543. ! putenv.c      qsort.c        raise.c      rand.c    random.c \
  1544. ! realloc.c     regexp.c        regsup.c      sbrk.c    setbuf.c \
  1545. ! setjmp.cpp    setlocal.c    setvbuf.c      sgtty.c    siglist.c \
  1546. ! sprintf.c     stksiz.c        strcat.c      strchr.c    strcmp.c \
  1547. ! strcoll.c     strcpy.c        strcspn.c      strdup.c    strerror.c \
  1548. ! strftime.c    stricmp.c        strlen.c      strlwr.c    strncat.c \
  1549. ! strncmp.c     strncpy.c        strnicmp.c      strpbrk.c    strrchr.c \
  1550. ! strrev.c      strspn.c        strstr.c      strtok.c    strtol.c \
  1551. ! strtoul.c     strupr.c        system.c      sysvar.c    textio.c \
  1552. ! time.c          timeoday.c    tmpfile.c      tmpnam.c    toxxx.c \
  1553. ! utime.c          vfprintf.c    vprintf.c      wcmb.c    wcscat.c \
  1554. ! wcscmp.c      wcscpy.c        wcslen.c      wnull.c \
  1555.   
  1556.   MINTLIB= \
  1557.   GMakefile.16  GMakefile.32  GNUGPL2      Makefile    alarm.c \
  1558. *** 41.1    1993/11/03 13:33:02
  1559. --- Makefile.adm    1993/11/04 03:28:18
  1560. ***************
  1561. *** 95,102 ****
  1562.       done
  1563.   
  1564.   newversion:
  1565. !     for dir in . $(incdir) $(incdir)/sys crlf lattice purec \
  1566. !         purec/unixname sozobon ;\
  1567.       do \
  1568.         cd $$dir ;\
  1569.         ci -l -f -m- -r$V.1 RCS/* ;\
  1570. --- 95,103 ----
  1571.       done
  1572.   
  1573.   newversion:
  1574. !     for dir in $(srcdir) $(srcdir)/crlf $(srcdir)/lattice \
  1575. !         $(srcdir)/purec $(srcdir)/purec/unixname \
  1576. !         $(srcdir)/sozobon $(incdir) $(incdir)/sys ;\
  1577.       do \
  1578.         cd $$dir ;\
  1579.         ci -l -f -m- -r$V.1 RCS/* ;\
  1580. *** 41.1    1993/11/03 13:33:02
  1581. --- PatchLev.h    1993/11/04 03:25:48
  1582. ***************
  1583. *** 3,6 ****
  1584.    *    directory.
  1585.    */
  1586.   
  1587. ! #define PatchLevel "41"
  1588. --- 3,6 ----
  1589.    *    directory.
  1590.    */
  1591.   
  1592. ! #define PatchLevel "42"
  1593. *** 41.1    1993/11/03 13:33:02
  1594. --- Version    1993/11/04 03:25:54
  1595. ***************
  1596. *** 1 ****
  1597. ! V=41
  1598. --- 1 ----
  1599. ! V=42
  1600. *** 41.1    1993/11/03 13:33:02
  1601. --- dup.c    1994/01/09 10:30:52
  1602. ***************
  1603. *** 56,62 ****
  1604.       int rv;
  1605.       long flags;
  1606.   
  1607. !     close(handle2);
  1608.       if ((rv = (int)Fforce(handle2, handle1)) < 0)
  1609.           errno = -rv;
  1610.       else {
  1611. --- 56,64 ----
  1612.       int rv;
  1613.       long flags;
  1614.   
  1615. !     if (handle1 == handle2)
  1616. !         return (handle2);
  1617.       if ((rv = (int)Fforce(handle2, handle1)) < 0)
  1618.           errno = -rv;
  1619.       else {
  1620. *** 41.1    1993/11/03 13:33:02
  1621. --- execp.c    1994/01/09 09:16:02
  1622. ***************
  1623. *** 30,36 ****
  1624.   {
  1625.       const char *execname;
  1626.       char buffer[PATH_MAX];
  1627. !     execname = buffindfile(name, getenv("PATH"), extensions,buffer);
  1628.       if (!execname) {
  1629.           errno = ENOENT;
  1630.           return -1;        /* file not found */
  1631. --- 30,36 ----
  1632.   {
  1633.       const char *execname;
  1634.       char buffer[PATH_MAX];
  1635. !     execname = _buffindfile(name, getenv("PATH"), extensions,buffer);
  1636.       if (!execname) {
  1637.           errno = ENOENT;
  1638.           return -1;        /* file not found */
  1639. *** 41.1    1993/11/03 13:33:02
  1640. --- fopenp.c    1994/01/09 09:16:06
  1641. ***************
  1642. *** 15,21 ****
  1643.       char *fullname;
  1644.       char buffer[PATH_MAX];
  1645.   
  1646. !     fullname = buffindfile(name, getenv("PATH"), (char **)0, buffer);
  1647.       if (!fullname) {
  1648.           errno = ENOENT;
  1649.           return NULL;
  1650. --- 15,21 ----
  1651.       char *fullname;
  1652.       char buffer[PATH_MAX];
  1653.   
  1654. !     fullname = _buffindfile(name, getenv("PATH"), (char **)0, buffer);
  1655.       if (!fullname) {
  1656.           errno = ENOENT;
  1657.           return NULL;
  1658. *** 41.1    1993/11/03 13:33:02
  1659. --- main.c    1994/01/09 10:09:50
  1660. ***************
  1661. *** 196,216 ****
  1662.                   }
  1663.                   
  1664.                   if (!strncmp(s, p, len) && s[len] == '=') {
  1665. !                     len++;
  1666. !                     tmp = s + len;        /* tmp now after '=' */    
  1667. !                     cnt = 1;
  1668. !                     while (*tmp) {        /* count words */
  1669. !                         if (*tmp == ';' || *tmp == ',')
  1670. !                             cnt++;
  1671. !                         tmp++;
  1672. !                     }
  1673. !                     _envp[i] = (char *) malloc(tmp - s + cnt * 2);
  1674. !                     strncpy(_envp[i], s, len);
  1675. !                     _path_dos2unx(s + len, _envp[i] + len);
  1676. !                     _envp[i] = (char *) realloc(_envp[i], 
  1677. !                         strlen(_envp[i]) + 1);
  1678. !                     break;        
  1679.                   }
  1680.                   
  1681.                   if (! *tmp) break;
  1682. --- 196,217 ----
  1683.                   }
  1684.                   
  1685.                   if (!strncmp(s, p, len) && s[len] == '=') {
  1686. !                   len++;
  1687. !                   tmp = s + len; /* tmp now after '=' */
  1688. !                   cnt = 1;
  1689. !                   while (*tmp) {  /* count words */
  1690. !                     if (*tmp == ';' || *tmp == ',')
  1691. !                       cnt++;
  1692. !                     tmp++;
  1693. !                   }
  1694. !                   _envp[i] = (char *)
  1695. !                                              malloc((size_t)
  1696. !                                                     (tmp - s + cnt * 5));
  1697. !                   strncpy(_envp[i], s, len);
  1698. !                   _path_dos2unx(s + len, _envp[i] + len);
  1699. !                   _envp[i] = (char *) realloc(_envp[i], 
  1700. !                                 strlen(_envp[i]) + 1);
  1701. !                   break;        
  1702.                   }
  1703.                   
  1704.                   if (! *tmp) break;
  1705. ***************
  1706. *** 223,243 ****
  1707.               if (s[0] == 'P' && s[1] == 'A' && s[2] == 'T' &&
  1708.                   s[3] == 'H' && s[4] == '=')
  1709.               {
  1710. !                 tmp = s + 5; /* tmp now after '=' */    
  1711. !                 cnt = 1;
  1712. !                 while (*tmp)
  1713. !                   {
  1714. !                     /* count words */
  1715. !                     if (*tmp == ';' || *tmp == ',')
  1716. !                       cnt++;
  1717. !                     tmp++;
  1718. !                   }
  1719. !                 _envp[i] = (char *) malloc(tmp - s + cnt * 2);
  1720. !                 strncpy(_envp[i], s, 5);
  1721. !                 _path_dos2unx(s + 5, _envp[i] + 5);
  1722. !                 _envp[i] = (char *) realloc(_envp[i], 
  1723. !                     strlen(_envp[i]) + 1);
  1724. !                 break;
  1725.               }
  1726.           }
  1727.       }
  1728. --- 224,245 ----
  1729.               if (s[0] == 'P' && s[1] == 'A' && s[2] == 'T' &&
  1730.                   s[3] == 'H' && s[4] == '=')
  1731.               {
  1732. !               tmp = s + 5; /* tmp now after '=' */    
  1733. !               cnt = 1;
  1734. !               while (*tmp)
  1735. !               {
  1736. !                 /* count words */
  1737. !                 if (*tmp == ';' || *tmp == ',')
  1738. !                   cnt++;
  1739. !                 tmp++;
  1740. !               }
  1741. !               _envp[i] = (char *) malloc((size_t)
  1742. !                                                      (tmp - s + cnt * 5));
  1743. !               strncpy(_envp[i], s, 5);
  1744. !               _path_dos2unx(s + 5, _envp[i] + 5);
  1745. !               _envp[i] = (char *) realloc(_envp[i], 
  1746. !                                           strlen(_envp[i]) + 1);
  1747. !               break;
  1748.               }
  1749.           }
  1750.       }
  1751. *** 41.1    1993/11/03 13:33:02
  1752. --- mincl    1994/01/09 09:38:10
  1753. ***************
  1754. *** 11,18 ****
  1755.   GLIB2 = _muldi3.o _divdi3.o _moddi3.o _udivdi3.o _umoddi3.o _negdi2.o \
  1756.       _lshrdi3.o _lshldi3.o _ashldi3.o _ashrdi3.o _udivmoddi4.o _cmpdi2.o \
  1757.       _ucmpdi2.o _floatdidf.o _floatdisf.o _fixunsdfsi.o _fixunssfsi.o \
  1758. !     _fixunsdfdi.o _fixdfdi.o _fixunssfdi.o _fixsfdi.o _builtin_new.o \
  1759. !     _caps_New.o _builtin_del.o _trampoline.o __main.o _ctor_list.o \
  1760.       _dtor_list.o _ffsdi2.o
  1761.   
  1762.   GCC=     crtinit.o stksiz.o inistack.o heapbase.o binmode.o \
  1763. --- 11,18 ----
  1764.   GLIB2 = _muldi3.o _divdi3.o _moddi3.o _udivdi3.o _umoddi3.o _negdi2.o \
  1765.       _lshrdi3.o _lshldi3.o _ashldi3.o _ashrdi3.o _udivmoddi4.o _cmpdi2.o \
  1766.       _ucmpdi2.o _floatdidf.o _floatdisf.o _fixunsdfsi.o _fixunssfsi.o \
  1767. !     _fixunsdfdi.o _fixdfdi.o _fixunssfdi.o _fixsfdi.o _op_new.o \
  1768. !     _new_handler.o _op_delete.o _trampoline.o __main.o _ctor_list.o \
  1769.       _dtor_list.o _ffsdi2.o
  1770.   
  1771.   GCC=     crtinit.o stksiz.o inistack.o heapbase.o binmode.o \
  1772. ***************
  1773. *** 43,49 ****
  1774.   
  1775.   #
  1776.   # other miscellaneous stuff
  1777. ! PORT =  a64l.o alphasor.o abs.o ctermid.o cuserid.o \
  1778.       ffs.o findfile.o fopenp.o frwbin.o ftw.o \
  1779.       gethostn.o getlogin.o getopt.o getpages.o getpass.o getpw.o grp.o \
  1780.       mktemp.o nlist.o obstack.o \
  1781. --- 43,49 ----
  1782.   
  1783.   #
  1784.   # other miscellaneous stuff
  1785. ! PORT =  a64l.o alphasor.o abs.o buffindf.o ctermid.o cuserid.o \
  1786.       ffs.o findfile.o fopenp.o frwbin.o ftw.o \
  1787.       gethostn.o getlogin.o getopt.o getpages.o getpass.o getpw.o grp.o \
  1788.       mktemp.o nlist.o obstack.o \
  1789. *** 41.1    1993/11/03 13:33:02
  1790. --- open.c    1994/01/09 10:46:32
  1791. ***************
  1792. *** 78,85 ****
  1793.       iomode = iomode & ~O_SHMODE;
  1794.   
  1795.       if (__mint >= 9) {
  1796. !         modemask = O_ACCMODE | O_SHMODE | O_SYNC | O_NDELAY | O_CREAT | O_TRUNC;
  1797. !         iomode |= (iomode & O_EXCL) ? O_DENYRW : O_DENYNONE;
  1798.           if (__mint >= 96) {
  1799.               modemask |= _REALO_APPEND;
  1800.               if (iomode & O_APPEND)
  1801. --- 78,86 ----
  1802.       iomode = iomode & ~O_SHMODE;
  1803.   
  1804.       if (__mint >= 9) {
  1805. !         modemask = O_ACCMODE | O_SHMODE | O_SYNC | O_NDELAY 
  1806. !                            | O_CREAT | O_TRUNC | O_EXCL;
  1807. !         iomode |= O_DENYNONE;
  1808.           if (__mint >= 96) {
  1809.               modemask |= _REALO_APPEND;
  1810.               if (iomode & O_APPEND)
  1811. *** 41.1    1993/11/03 13:33:02
  1812. --- scanf.c    1994/01/09 09:54:40
  1813. ***************
  1814. *** 3,9 ****
  1815.   #include <string.h>
  1816.   #include <stdarg.h>
  1817.   #include "lib.h"
  1818. !     
  1819.   /*
  1820.    * %efg were loosing big time
  1821.    *    fixed  ++jrb
  1822. --- 3,9 ----
  1823.   #include <string.h>
  1824.   #include <stdarg.h>
  1825.   #include "lib.h"
  1826.   /*
  1827.    * %efg were loosing big time
  1828.    *    fixed  ++jrb
  1829. ***************
  1830. *** 16,30 ****
  1831.   #ifndef __NO_FLOAT__
  1832.   #define FLOATS 1
  1833.   #endif
  1834. !     
  1835.   #ifndef TRUE
  1836.   #define TRUE  1
  1837.   #define FALSE 0
  1838.   #endif
  1839. -     
  1840. - extern        char    _numstr[];
  1841.   
  1842. ! #define    skip()    while(isspace(c)) { charcnt++; if ((c=(*get)(ip))<1) goto done; }
  1843.   #define TEN_MUL(X)    ((((X) << 2) + (X)) << 1)
  1844.   
  1845.   #if FLOATS
  1846. --- 16,29 ----
  1847.   #ifndef __NO_FLOAT__
  1848.   #define FLOATS 1
  1849.   #endif
  1850.   #ifndef TRUE
  1851.   #define TRUE  1
  1852.   #define FALSE 0
  1853.   #endif
  1854.   
  1855. ! #define    skip() \
  1856. !   while (isspace(c)) { charcnt++; c = (*get)(ip); if (c == EOF) goto done; }
  1857.   #define TEN_MUL(X)    ((((X) << 2) + (X)) << 1)
  1858.   
  1859.   #if FLOATS
  1860. ***************
  1861. *** 89,95 ****
  1862.    int (*unget)(int, FILE *), const char *_fmt, va_list args)
  1863.   #else
  1864.   int
  1865. ! _scanf(ip, get, unget, fmt, args)
  1866.   FILE *ip;
  1867.   int (*get) __PROTO((FILE *));
  1868.   int (*unget) __PROTO((int, FILE *));
  1869. --- 88,94 ----
  1870.    int (*unget)(int, FILE *), const char *_fmt, va_list args)
  1871.   #else
  1872.   int
  1873. ! _scanf(ip, get, unget, _fmt, args)
  1874.   FILE *ip;
  1875.   int (*get) __PROTO((FILE *));
  1876.   int (*unget) __PROTO((int, FILE *));
  1877. ***************
  1878. *** 99,262 ****
  1879.   {
  1880.       register long n;
  1881.       register int c, width, lval, sval, cnt = 0, charcnt = 1;
  1882.   #ifdef PRINTF_LONGLONG
  1883. -     register int llval=0;
  1884.       register long long lln;
  1885.   #endif
  1886. !     int store, neg, base, wide1, endnull, rngflag, c2;
  1887.       register unsigned char *p = 0;
  1888.       const unsigned char *fmt = (const unsigned char *) _fmt;
  1889. !     unsigned char delim[128], digits[17], *q;
  1890.   #if FLOATS
  1891.       double fx;
  1892.       char fbuf[128], *fbp;
  1893.       int fstate, trans;
  1894.       extern double atof __PROTO((const char *));
  1895.   #endif
  1896. !     
  1897. !     if (!*fmt)
  1898. !     return(0);
  1899. !     
  1900.       c = (*get)(ip);
  1901. !     while(c > 0)
  1902.       {
  1903. -     store = FALSE;
  1904.       if (*fmt == '%')
  1905.       {
  1906. -         n    = 0;
  1907.           width    = -1;
  1908. -         wide1    = 1;
  1909. -         base    = 10;
  1910.           lval    = FALSE;
  1911. ! #ifdef PRINTF_LONGLONG
  1912.           llval    = FALSE;
  1913. -         lln     = 0;
  1914.   #endif
  1915.           sval    = FALSE;
  1916.           store    = TRUE;
  1917. !         endnull    = TRUE;
  1918. !         neg    = -1;
  1919. !         
  1920. !         strcpy((char *)delim,  "\011\012\013\014\015 ");
  1921. !         strcpy((char *)digits, (const char *)_numstr); /* "01234567890ABCDEF" */
  1922. !         
  1923. !         if (fmt[1] == '*')
  1924.           {
  1925. !         endnull = store = FALSE;
  1926.           ++fmt;
  1927.           }
  1928. !         
  1929. !         while (isdigit(*++fmt))        /* width digit(s) */
  1930. !         {
  1931. !         if (width == -1)
  1932. !             width = 0;
  1933. !         wide1 = width = TEN_MUL(width) + (*fmt - '0');
  1934. !         }
  1935. !         --fmt;
  1936.         fmtnxt:
  1937. !         ++fmt;
  1938. !         switch(tolower(*fmt))    /* tolower() is a MACRO! */
  1939.           {
  1940. -           case '*':
  1941. -         endnull = store = FALSE;
  1942. -         goto fmtnxt;
  1943. -         
  1944.             case 'l':    /* long data */
  1945.   #ifdef PRINTF_LONGLONG
  1946.           if (lval)
  1947.               llval = TRUE;
  1948.   #endif
  1949.           lval = TRUE;
  1950.             case 'h':    /* short data (for compatibility) */
  1951.           sval = TRUE;
  1952.           goto fmtnxt;
  1953. !         
  1954.             case 'i':    /* any-base numeric */
  1955.           base = 0;
  1956.           goto numfmt;
  1957. !         
  1958. !           case 'b':    /* unsigned binary */
  1959.           base = 2;
  1960.           goto numfmt;
  1961. !         
  1962.             case 'o':    /* unsigned octal */
  1963.           base = 8;
  1964.           goto numfmt;
  1965. !         
  1966.             case 'x':    /* unsigned hexadecimal */
  1967.           base = 16;
  1968.           goto numfmt;
  1969. !         
  1970.             case 'd':    /* SIGNED decimal */
  1971. !         neg = FALSE;
  1972. !         /* FALL-THRU */
  1973. !         
  1974.             case 'u':    /* unsigned decimal */
  1975. !           numfmt:                    skip();
  1976. !         
  1977. !         if (isupper(*fmt)) {
  1978.   #ifdef PRINTF_LONGLONG
  1979.               if (lval) llval = TRUE;
  1980.   #endif
  1981.               lval = TRUE;
  1982. !         }        
  1983.           if (!base)
  1984.           {
  1985. !             base = 10;
  1986. !             neg = FALSE;
  1987. !             if (c == '%')
  1988.               {
  1989.               base = 2;
  1990.               goto skip1;
  1991.               }
  1992.               else if (c == '0')
  1993.               {
  1994.               charcnt++;
  1995.               c = (*get)(ip);
  1996. !             if (c < 1)
  1997.                   goto savnum;
  1998.               if ((c != 'x')
  1999.                   && (c != 'X'))
  2000.               {
  2001.                   base = 8;
  2002. !                 digits[8]= '\0';
  2003.                   goto zeroin;
  2004.               }
  2005.               base = 16;
  2006.               goto skip1;
  2007.               }
  2008.           }
  2009. !         
  2010. !         if ((neg == FALSE) && (base == 10)
  2011. !             && (((neg = (c == '-')) != 0) || (c == '+')))
  2012. !         {
  2013. !           skip1:
  2014.               charcnt++;
  2015. !             c = (*get)(ip);
  2016. !             if (c < 1)
  2017. !             goto done;
  2018. !         }
  2019. !         
  2020. !         digits[base] = '\0';
  2021. !         p = ((unsigned char *)
  2022. !              strchr((const char *)digits,toupper(c)));
  2023. !         
  2024. !         if ((!c || !p) && width)
  2025. !             goto done;
  2026. !         
  2027. !         while (p && width-- && c)
  2028.           {
  2029.   #ifdef PRINTF_LONGLONG
  2030.               if (llval)
  2031. !             lln = (lln * base) + (p - digits);
  2032.               else
  2033.   #endif
  2034. !             n = (n * base) + (p - digits);
  2035.               charcnt++;
  2036.               c = (*get)(ip);
  2037.             zeroin:
  2038. !             p = ((unsigned char *)
  2039. !              strchr((const char *)digits,toupper(c)));
  2040.           }
  2041.             savnum:
  2042.           if (store)
  2043. --- 98,313 ----
  2044.   {
  2045.       register long n;
  2046.       register int c, width, lval, sval, cnt = 0, charcnt = 1;
  2047. + #if defined (PRINTF_LONGLONG) || defined (__STDC__)
  2048. +     register int llval = 0;
  2049. + #endif
  2050.   #ifdef PRINTF_LONGLONG
  2051.       register long long lln;
  2052.   #endif
  2053. !     int store, neg, base, endnull, c2;
  2054.       register unsigned char *p = 0;
  2055.       const unsigned char *fmt = (const unsigned char *) _fmt;
  2056. !     char delim[256], *q;
  2057.   #if FLOATS
  2058.       double fx;
  2059.       char fbuf[128], *fbp;
  2060.       int fstate, trans;
  2061.       extern double atof __PROTO((const char *));
  2062.   #endif
  2063.       c = (*get)(ip);
  2064. !     while (*fmt)
  2065.       {
  2066.       if (*fmt == '%')
  2067.       {
  2068.           width    = -1;
  2069.           lval    = FALSE;
  2070. ! #if defined (PRINTF_LONGLONG) || defined (__STDC__)
  2071.           llval    = FALSE;
  2072.   #endif
  2073.           sval    = FALSE;
  2074.           store    = TRUE;
  2075. !         if (*++fmt == '*')
  2076.           {
  2077. !         store = FALSE;
  2078.           ++fmt;
  2079.           }
  2080. !         if (isdigit (*fmt))        /* width digit(s) */
  2081. !           {
  2082. !         width = *fmt++ - '0';
  2083. !         while (isdigit (*fmt))
  2084. !           width = TEN_MUL (width) + *fmt++ - '0';
  2085. !           }
  2086.         fmtnxt:
  2087. !         switch(*fmt++)
  2088.           {
  2089.             case 'l':    /* long data */
  2090.   #ifdef PRINTF_LONGLONG
  2091.           if (lval)
  2092.               llval = TRUE;
  2093.   #endif
  2094.           lval = TRUE;
  2095. +         goto fmtnxt;
  2096. + #ifdef __STDC__
  2097. +           case 'L': /* long double */
  2098. +         llval = TRUE;
  2099. +         goto fmtnxt;
  2100. + #endif
  2101.             case 'h':    /* short data (for compatibility) */
  2102.           sval = TRUE;
  2103.           goto fmtnxt;
  2104.             case 'i':    /* any-base numeric */
  2105.           base = 0;
  2106. +         neg = -1;
  2107.           goto numfmt;
  2108. !           case 'b':    /* unsigned binary, non-standard */
  2109. !           case 'B': /* non-standard */
  2110.           base = 2;
  2111. +         neg = 0;
  2112.           goto numfmt;
  2113.             case 'o':    /* unsigned octal */
  2114. +           case 'O': /* non-standard */
  2115.           base = 8;
  2116. +         neg = 0;
  2117.           goto numfmt;
  2118. !           case 'p': /* pointer */
  2119. !         lval = TRUE;
  2120. ! #ifdef PRINTF_LONGLONG
  2121. !         llval = FALSE;
  2122. ! #endif
  2123. !         /* fall through */
  2124.             case 'x':    /* unsigned hexadecimal */
  2125. +           case 'X': /* non-standard */
  2126.           base = 16;
  2127. +         neg = 0;
  2128.           goto numfmt;
  2129.             case 'd':    /* SIGNED decimal */
  2130. !           case 'D': /* non-standard */
  2131. !         base = 10;
  2132. !         neg = -1;
  2133. !         goto numfmt;
  2134.             case 'u':    /* unsigned decimal */
  2135. !           case 'U': /* non-standard */
  2136. !         base = 10;
  2137. !         neg = 0;
  2138. !           numfmt:
  2139. !         skip();
  2140. !         memset (delim, -1, sizeof (delim));
  2141. !         if (isupper(fmt[-1])) {
  2142. !             /* non-standard */
  2143.   #ifdef PRINTF_LONGLONG
  2144.               if (lval) llval = TRUE;
  2145.   #endif
  2146.               lval = TRUE;
  2147. !         }
  2148. !         n = 0;
  2149. ! #ifdef PRINTF_LONGLONG
  2150. !         lln = 0;
  2151. ! #endif
  2152. !         if (width == 0)
  2153. !           goto savnum;
  2154.           if (!base)
  2155.           {
  2156. !             if (c == '%') /* non-standard */
  2157.               {
  2158.               base = 2;
  2159. +             neg = 0;
  2160.               goto skip1;
  2161.               }
  2162.               else if (c == '0')
  2163.               {
  2164. +             if (--width == 0)
  2165. +               goto savnum;
  2166.               charcnt++;
  2167.               c = (*get)(ip);
  2168. !             if (c == EOF)
  2169.                   goto savnum;
  2170.               if ((c != 'x')
  2171.                   && (c != 'X'))
  2172.               {
  2173.                   base = 8;
  2174. !                 neg = 0;
  2175. !                 for (c2 = 0; c2 < 8; c2++)
  2176. !                   delim[c2 + '0'] = c2;
  2177.                   goto zeroin;
  2178.               }
  2179.               base = 16;
  2180. +             neg = 0;
  2181.               goto skip1;
  2182.               }
  2183. +             else
  2184. +               base = 10;
  2185.           }
  2186. !         /* Check for 0x prefix */
  2187. !         if (base == 16 && c == '0')
  2188. !           {
  2189. !             if (--width == 0)
  2190. !               goto savnum;
  2191.               charcnt++;
  2192. !             c = (*get) (ip);
  2193. !             if (c == EOF)
  2194. !               goto done;
  2195. !             if (c == 'x' || c == 'X')
  2196. !               goto skip1;
  2197. !           }
  2198. !         else if (neg == -1)
  2199. !           {
  2200. !             neg = c == '-';
  2201. !             if (neg || c == '+')
  2202. !               {
  2203. !               skip1:
  2204. !             if (--width == 0)
  2205. !               goto done;
  2206. !             charcnt++;
  2207. !             c = (*get)(ip);
  2208. !             if (c == EOF)
  2209. !               goto done;
  2210. !               }
  2211. !           }
  2212. !         /* delim[c] -> value of c or -1 */
  2213. !         p = (unsigned char *) "FEDCBAfedcba9876543210";
  2214. !         q = "\17\16\15\14\13\12\17\16\15\14\13\12\11\10\7\6\5\4\3\2\1\0";
  2215. !         if (base < 16)
  2216. !           {
  2217. !             /* skip invalid digits */
  2218. !             p += 22 - base;
  2219. !             q += 22 - base;
  2220. !           }
  2221. !         while (*p)
  2222. !           delim[*p++] = *q++;
  2223. !         if (delim[c] == (char) -1)
  2224. !           goto done;
  2225. !         while (width--)
  2226.           {
  2227.   #ifdef PRINTF_LONGLONG
  2228.               if (llval)
  2229. !             lln = (lln * base) + delim[c];
  2230.               else
  2231.   #endif
  2232. !             n = (n * base) + delim[c];
  2233.               charcnt++;
  2234.               c = (*get)(ip);
  2235. +             if (c == EOF)
  2236. +               break;
  2237.             zeroin:
  2238. !             if (delim[c] == (char) -1)
  2239. !               break;
  2240.           }
  2241.             savnum:
  2242.           if (store)
  2243. ***************
  2244. *** 269,282 ****
  2245.   #ifdef PRINTF_LONGLONG
  2246.               if (llval)
  2247.               {
  2248. !             if (neg == TRUE)
  2249.                   lln=-lln;
  2250.               *((long long*) p) = lln;
  2251.               }
  2252.               else
  2253.   #endif
  2254.               {
  2255. !             if (neg == TRUE)
  2256.                   n = -n;
  2257.               if (lval)
  2258.                   *((long*) p) = n;
  2259. --- 320,333 ----
  2260.   #ifdef PRINTF_LONGLONG
  2261.               if (llval)
  2262.               {
  2263. !             if (neg)
  2264.                   lln=-lln;
  2265.               *((long long*) p) = lln;
  2266.               }
  2267.               else
  2268.   #endif
  2269.               {
  2270. !             if (neg)
  2271.                   n = -n;
  2272.               if (lval)
  2273.                   *((long*) p) = n;
  2274. ***************
  2275. *** 288,327 ****
  2276.               }
  2277.           }
  2278.           break;
  2279. !         
  2280.   #if FLOATS
  2281.             case 'e':    /* float */
  2282.             case 'f':
  2283.             case 'g':
  2284.           skip();
  2285. !         
  2286. !         if (isupper(*fmt))
  2287. !             lval = TRUE;
  2288. !         
  2289.           fstate = FS_INIT;
  2290.           fbp = fbuf;
  2291. !         while (c && width--) {
  2292. !             if (c >= '0' && c <= '9')
  2293. !             trans = FC_DIG;
  2294. !             else if (c == '.')
  2295. !             trans = FC_DOT;
  2296. !             else if (c == '+' || c == '-')
  2297. !             trans = FC_SIGN;
  2298. !             else if (tolower(c) == 'e')
  2299. !             trans = FC_E;
  2300. !             else
  2301. !             goto fdone;
  2302. !             
  2303. !             *fbp++ = c;
  2304.   
  2305.               if (fp_do[trans][fstate] == F_QUIT)
  2306. !             goto fdone;
  2307.               fstate = fp_ns[trans][fstate];
  2308.               charcnt++;
  2309.               c = (*get)(ip);
  2310.           }
  2311. !         
  2312. !           fdone:
  2313.           *fbp = '\0';
  2314.           if (!fp_sval[fstate])
  2315.               goto done;
  2316. --- 339,380 ----
  2317.               }
  2318.           }
  2319.           break;
  2320.   #if FLOATS
  2321. +           case 'E': /* non-standard */
  2322. +           case 'F':
  2323. +           case 'G':
  2324. +         lval = TRUE;
  2325. +         /* fall through */
  2326.             case 'e':    /* float */
  2327.             case 'f':
  2328.             case 'g':
  2329.           skip();
  2330. !         memset (delim, -1, sizeof (delim));
  2331. !         for (c2 = '0'; c2 <= '9'; c2++)
  2332. !           delim[c2] = FC_DIG;
  2333. !         delim['.'] = FC_DOT;
  2334. !         delim['+'] = delim['-'] = FC_SIGN;
  2335. !         delim['e'] = delim['E'] = FC_E;
  2336.           fstate = FS_INIT;
  2337.           fbp = fbuf;
  2338. !         while (c != EOF && width--) {
  2339. !             trans = delim[c];
  2340. !             if (trans == (char) -1)
  2341. !               break;
  2342. !             if (fbp - fbuf + 1 < sizeof (fbuf))
  2343. !               *fbp++ = c;
  2344.   
  2345.               if (fp_do[trans][fstate] == F_QUIT)
  2346. !             break;
  2347.               fstate = fp_ns[trans][fstate];
  2348.               charcnt++;
  2349.               c = (*get)(ip);
  2350.           }
  2351.           *fbp = '\0';
  2352.           if (!fp_sval[fstate])
  2353.               goto done;
  2354. ***************
  2355. *** 332,337 ****
  2356. --- 385,398 ----
  2357.   #else
  2358.               p = (unsigned char *) *args;
  2359.   #endif
  2360. + #ifdef __STDC__
  2361. +             /* partial support for long double */
  2362. + #ifdef __M68881__   /* currently only with m68881 */
  2363. +             if (llval)
  2364. +               *(long double *) p = (long double) fx;
  2365. +             else
  2366. + #endif
  2367. + #endif
  2368.               if (lval)
  2369.               *((double *) p) = fx;
  2370.               else
  2371. ***************
  2372. *** 340,346 ****
  2373.           }
  2374.           break;
  2375.   #endif
  2376. !         
  2377.             case 'n':
  2378.           if (store) {
  2379.   #ifdef __STDC__
  2380. --- 401,407 ----
  2381.           }
  2382.           break;
  2383.   #endif
  2384.             case 'n':
  2385.           if (store) {
  2386.   #ifdef __STDC__
  2387. ***************
  2388. *** 348,414 ****
  2389.   #else
  2390.             p = (unsigned char *) *args;
  2391.   #endif
  2392. !           *((int *) p) = charcnt;
  2393.           }
  2394.           break;
  2395. !         
  2396.             case 'c':    /* character data */
  2397. !         width = wide1;
  2398.           endnull    = FALSE;
  2399. !         delim[0] = '\0';
  2400.           goto strproc;
  2401. !         
  2402.             case '[':    /* string w/ delimiter set */
  2403. !         
  2404.           /* get delimiters */
  2405. !         p = delim;
  2406. !         
  2407. !         if (*++fmt == '^')
  2408.               fmt++;
  2409. !         else
  2410. !             lval = TRUE;
  2411. !         
  2412. !         rngflag = 2;
  2413.           if ((*fmt == ']') || (*fmt == '-'))
  2414.           {
  2415. !             *p++ = *fmt++;
  2416. !             rngflag = FALSE;
  2417.           }
  2418. !         
  2419. !         while (*fmt != ']')
  2420.           {
  2421. !             if (*fmt == '\0')
  2422. !             goto done;
  2423. !             switch (rngflag)
  2424. !             {
  2425. !               case TRUE:
  2426. !             c2 = *(p-2);
  2427. !             if (c2 <= *fmt)
  2428. !             {
  2429. !                 p -= 2;
  2430. !                 while (c2 < *fmt)
  2431. !                 *p++ = c2++;
  2432. !                 rngflag = 2;
  2433. !                 break;
  2434. !             }
  2435. !             /* fall thru intentional */
  2436. !             
  2437. !               case FALSE:
  2438. !             rngflag = (*fmt == '-');
  2439. !             break;
  2440. !             
  2441. !               case 2:
  2442. !             rngflag = FALSE;
  2443. !             }
  2444. !             
  2445. !             *p++ = *fmt++;
  2446.           }
  2447. !         
  2448. !         *p = '\0';
  2449.           goto strproc;
  2450. !         
  2451.             case 's':    /* string data */
  2452.           skip();
  2453.             strproc:
  2454.           /* process string */
  2455.   #ifdef __STDC__
  2456. --- 409,472 ----
  2457.   #else
  2458.             p = (unsigned char *) *args;
  2459.   #endif
  2460. !           /* Compensate for lookahead */
  2461. !           *((int *) p) = charcnt - 1;
  2462.           }
  2463.           break;
  2464.             case 'c':    /* character data */
  2465. !         if (width == -1)
  2466. !           width = 1;
  2467.           endnull    = FALSE;
  2468. !         memset (delim, 0, sizeof (delim));
  2469. !         if (c == EOF)
  2470. !           goto done;
  2471.           goto strproc;
  2472.             case '[':    /* string w/ delimiter set */
  2473. !         endnull    = TRUE;
  2474.           /* get delimiters */
  2475. !         neg = FALSE;
  2476. !         if (*fmt == '^')
  2477. !           {
  2478.               fmt++;
  2479. !             neg = TRUE;
  2480. !           }
  2481. !         memset (delim, !neg, sizeof (delim));
  2482.           if ((*fmt == ']') || (*fmt == '-'))
  2483.           {
  2484. !             delim[*fmt++] = neg;
  2485.           }
  2486. !         while (c2 = *fmt++, c2 != ']')
  2487.           {
  2488. !             if (c2 == '\0')
  2489. !               break;
  2490. !             if (*fmt == '-' && fmt[1] && fmt[1] != ']')
  2491. !               {
  2492. !             while (c2 <= fmt[1])
  2493. !               delim[c2++] = neg;
  2494. !             fmt += 2;
  2495. !               }
  2496. !             else
  2497. !               delim[c2] = neg;
  2498.           }
  2499.           goto strproc;
  2500.             case 's':    /* string data */
  2501.           skip();
  2502. +         memset (delim, 0, sizeof (delim));
  2503. +         delim['\t'] = 1;
  2504. +         delim['\n'] = 1;
  2505. +         delim['\v'] = 1;
  2506. +         delim['\f'] = 1;
  2507. +         delim['\r'] = 1;
  2508. +         delim[' '] = 1;
  2509. +         endnull    = TRUE;
  2510.             strproc:
  2511.           /* process string */
  2512.   #ifdef __STDC__
  2513. ***************
  2514. *** 417,430 ****
  2515.   #else
  2516.           p = ((unsigned char *) *args);
  2517.   #endif
  2518. !         
  2519.           /* if the 1st char fails, match fails */
  2520.           if (width)
  2521.           {
  2522. !             q = ((unsigned char *)
  2523. !              strchr((const char *)delim, c));
  2524. !             if((c < 1)
  2525. !                || (lval ? (q == NULL) : (q != NULL)))
  2526.               {
  2527.               if (endnull)
  2528.                   if (store)
  2529. --- 475,485 ----
  2530.   #else
  2531.           p = ((unsigned char *) *args);
  2532.   #endif
  2533.           /* if the 1st char fails, match fails */
  2534.           if (width)
  2535.           {
  2536. !             if (c == EOF || delim[c])
  2537.               {
  2538.               if (endnull)
  2539.                   if (store)
  2540. ***************
  2541. *** 432,452 ****
  2542.               goto done;
  2543.               }
  2544.           }
  2545. !         
  2546.           for (;;) /* FOREVER */
  2547.           {
  2548.               if (store)
  2549.               *p++ = c;
  2550.               charcnt++;
  2551. !             if (((c = (*get)(ip)) < 1) ||
  2552. !             (--width == 0))
  2553.               break;
  2554. !             q = ((unsigned char *)
  2555. !              strchr((const char *)delim, c));
  2556. !             if (lval ? (q == NULL) : (q != NULL))
  2557.               break;
  2558.           }
  2559. !         
  2560.           if (store)
  2561.           {
  2562.               if (endnull)
  2563. --- 487,505 ----
  2564.               goto done;
  2565.               }
  2566.           }
  2567.           for (;;) /* FOREVER */
  2568.           {
  2569.               if (store)
  2570.               *p++ = c;
  2571.               charcnt++;
  2572. !             c = (*get)(ip);
  2573. !             if (c == EOF || --width == 0)
  2574.               break;
  2575. !             if (delim[c])
  2576.               break;
  2577.           }
  2578.           if (store)
  2579.           {
  2580.               if (endnull)
  2581. ***************
  2582. *** 454,499 ****
  2583.               ++cnt;
  2584.           }
  2585.           break;
  2586. !         
  2587. !           case '\0':    /* early EOS */
  2588.           --fmt;
  2589. -         /* FALL THRU */
  2590. -         
  2591. -           default:
  2592.           goto cmatch;
  2593.           }
  2594.       }
  2595.       else if (isspace(*fmt))        /* skip whitespace */
  2596.       {
  2597.           skip();
  2598.       }
  2599. !     else 
  2600.       {            /* normal match char */
  2601.         cmatch:
  2602. !         if (c != *fmt) 
  2603. !         break;
  2604. !         if (fmt[1] == 0) {    /* we're not going to have any more matches */
  2605. !         return (cnt);
  2606. !         }
  2607.           charcnt++;
  2608.           c = (*get)(ip);
  2609.       }
  2610. !     
  2611.   #ifdef __STDC__
  2612.       /* nothing to do */
  2613.   #else
  2614.       if (store)
  2615.           args++;
  2616.   #endif
  2617. -     
  2618. -     if (!*++fmt)
  2619. -         break;
  2620.       }
  2621. !     
  2622.     done:                        /* end of scan */
  2623. !     if ((c < 0) && (cnt == 0))
  2624.       return(EOF);
  2625. -     
  2626. -     (*unget)(c, ip);
  2627.       return(cnt);
  2628.   }
  2629. --- 507,547 ----
  2630.               ++cnt;
  2631.           }
  2632.           break;
  2633. !           case '%':
  2634.           --fmt;
  2635.           goto cmatch;
  2636. +           default:
  2637. +         goto done;
  2638.           }
  2639.       }
  2640.       else if (isspace(*fmt))        /* skip whitespace */
  2641.       {
  2642. +         fmt++;
  2643.           skip();
  2644.       }
  2645. !     else
  2646.       {            /* normal match char */
  2647.         cmatch:
  2648. !         if (c != *fmt++)
  2649. !           goto done;
  2650.           charcnt++;
  2651.           c = (*get)(ip);
  2652.       }
  2653.   #ifdef __STDC__
  2654.       /* nothing to do */
  2655.   #else
  2656.       if (store)
  2657.           args++;
  2658.   #endif
  2659.       }
  2660.     done:                        /* end of scan */
  2661. !     if (c != EOF)
  2662. !       (*unget) (c, ip);
  2663. !     if (c == EOF && cnt == 0)
  2664.       return(EOF);
  2665.       return(cnt);
  2666.   }
  2667. *** 41.1    1993/11/03 13:33:02
  2668. --- spawn.c    1994/01/09 09:16:12
  2669. ***************
  2670. *** 61,73 ****
  2671.   
  2672.   static char *const extensions[] = { "ttp", "prg", "tos", NULL };
  2673.   
  2674. ! static int interpret_script __PROTO((int mode, const char *path, 
  2675.                       char *const *argv, char *const *envp));
  2676.   
  2677.   static int
  2678. ! interpret_script(mode, path, argv, envp)
  2679.       int        mode;
  2680.       const char *path;
  2681.       char    *const *argv;
  2682.       char    *const *envp;
  2683.   {
  2684. --- 61,74 ----
  2685.   
  2686.   static char *const extensions[] = { "ttp", "prg", "tos", NULL };
  2687.   
  2688. ! static int interpret_script __PROTO((int mode, const char *path, const char *,
  2689.                       char *const *argv, char *const *envp));
  2690.   
  2691.   static int
  2692. ! interpret_script(mode, path, _path, argv, envp)
  2693.       int        mode;
  2694.       const char *path;
  2695. +     const char *_path;
  2696.       char    *const *argv;
  2697.       char    *const *envp;
  2698.   {
  2699. ***************
  2700. *** 140,146 ****
  2701.           
  2702.           if (*shell)
  2703.             {
  2704. !         shell = buffindfile (shell, getenv("PATH"), extensions, tmppath);
  2705.           if (!shell)
  2706.             {
  2707.               errno = ENOENT;
  2708. --- 141,147 ----
  2709.           
  2710.           if (*shell)
  2711.             {
  2712. !         shell = _buffindfile (shell, getenv("PATH"), extensions, tmppath);
  2713.           if (!shell)
  2714.             {
  2715.               errno = ENOENT;
  2716. ***************
  2717. *** 164,171 ****
  2718.             while (*shellargs++ != '\0');
  2719.           }
  2720.   
  2721. !         while (*argv != NULL)
  2722. !           shellargv[i++] = *argv++;
  2723.           shellargv[i] = NULL;
  2724.   
  2725.           rv = _spawnve(mode, shell, shellargv, envp);
  2726. --- 165,174 ----
  2727.             while (*shellargs++ != '\0');
  2728.           }
  2729.   
  2730. !         /* use the full pathname of the script instead of argv[0] */
  2731. !         shellargv[i++] = (char *) _path;
  2732. !         while (*++argv != NULL)
  2733. !           shellargv[i++] = *argv;
  2734.           shellargv[i] = NULL;
  2735.   
  2736.           rv = _spawnve(mode, shell, shellargv, envp);
  2737. ***************
  2738. *** 479,485 ****
  2739.               if ((umode = getenv("UNIXMODE")) != NULL &&
  2740.                       strchr(umode, 's') != NULL ) {
  2741.                   (void)Mfree(env);
  2742. !                 return interpret_script(mode, path, _argv, _envp);
  2743.               }
  2744.           }
  2745.   #endif
  2746. --- 482,488 ----
  2747.               if ((umode = getenv("UNIXMODE")) != NULL &&
  2748.                       strchr(umode, 's') != NULL ) {
  2749.                   (void)Mfree(env);
  2750. !                 return interpret_script(mode, path, _path, _argv, _envp);
  2751.               }
  2752.           }
  2753.   #endif
  2754. *** 41.1    1993/11/03 13:33:02
  2755. --- spawnvp.c    1994/01/09 09:16:14
  2756. ***************
  2757. *** 25,31 ****
  2758.   {
  2759.       const char *execname;
  2760.         char buffer[PATH_MAX];
  2761. !       execname = buffindfile(name, getenv("PATH"), extensions,buffer);
  2762.       if (!execname) {
  2763.           errno = ENOENT;
  2764.           return -1;        /* file not found */
  2765. --- 25,31 ----
  2766.   {
  2767.       const char *execname;
  2768.         char buffer[PATH_MAX];
  2769. !       execname = _buffindfile(name, getenv("PATH"), extensions,buffer);
  2770.       if (!execname) {
  2771.           errno = ENOENT;
  2772.           return -1;        /* file not found */
  2773. *** 41.1    1993/11/03 13:33:02
  2774. --- sync.c    1994/01/09 09:52:10
  2775. ***************
  2776. *** 11,19 ****
  2777.    *    minixfs V 060 PL 5 always syncs all drives, so there will
  2778.    *    be to much syncing, since we call Dcntl for all known drives.
  2779.    *    
  2780. !  * $Revision: 41.1 $   $Date: 1993/11/03 13:33:02 $    $Author: root $
  2781.    * 
  2782.    * $Log: sync.c,v $
  2783.    * Revision 41.1  1993/11/03  13:33:02  root
  2784.    * -
  2785.    *
  2786. --- 11,25 ----
  2787.    *    minixfs V 060 PL 5 always syncs all drives, so there will
  2788.    *    be to much syncing, since we call Dcntl for all known drives.
  2789.    *    
  2790. !  * $Revision: 41.2 $   $Date: 1994/01/09 09:52:04 $    $Author: schwab $
  2791.    * 
  2792.    * $Log: sync.c,v $
  2793. +  * Revision 41.2  1994/01/09  09:52:04  schwab
  2794. +  * fsync() uses the value from st_dev in the stat structure to form a
  2795. +  * pathname for Dcntl. This value can be > 0x100 for filesystems mounted
  2796. +  * via FS_MOUNT. Currently there is no way to sync such a filesystem, i
  2797. +  * have changed fsync to just return successfully in this case.
  2798. +  *
  2799.    * Revision 41.1  1993/11/03  13:33:02  root
  2800.    * -
  2801.    *
  2802. ***************
  2803. *** 107,112 ****
  2804. --- 113,123 ----
  2805.       
  2806.       if (fstat(fd, &statbuf))
  2807.           return -1;            /* errno set from fstat */
  2808. +     if (statbuf.st_dev >= 32)
  2809. +       /* If mounted via FS_MOUNT, st_dev will be > 0x100.
  2810. +          Pretend that it worked. */
  2811. +       return 0;
  2812.   
  2813.       path[0] = 'A'+ statbuf.st_dev;
  2814.       if (!Dcntl(MFS_VERIFY, path, &magic) && magic == MFS_MAGIC) {
  2815. *** 41.1    1993/11/03 13:33:02
  2816. --- tcattr.c    1993/11/24 21:08:30
  2817. ***************
  2818. *** 72,78 ****
  2819.               | ((sg.sg_flags & XKEY) ? IEXTEN : 0)
  2820.               | ((sg.sg_flags & RAW)
  2821.                   ? 0 
  2822. !                 : ((sg.sg_flags & CBREAK) ? ISIG : ICANON)));
  2823.     stp->_c_ispeed = (speed_t) sg.sg_ispeed;
  2824.     stp->_c_ospeed = (speed_t) sg.sg_ospeed;
  2825.     stp->c_cc[VEOF]    = (cc_t) t.t_eofc;
  2826. --- 72,78 ----
  2827.               | ((sg.sg_flags & XKEY) ? IEXTEN : 0)
  2828.               | ((sg.sg_flags & RAW)
  2829.                   ? 0 
  2830. !                 : ISIG | (sg.sg_flags & CBREAK ? 0 : ICANON)));
  2831.     stp->_c_ispeed = (speed_t) sg.sg_ispeed;
  2832.     stp->_c_ospeed = (speed_t) sg.sg_ospeed;
  2833.     stp->c_cc[VEOF]    = (cc_t) t.t_eofc;
  2834. ***************
  2835. *** 144,154 ****
  2836.     }
  2837.     sg.sg_flags |= ((stp->c_lflag & (TOSTOP | NOFLSH | ECHO))
  2838.               | ((stp->c_lflag & IEXTEN) ? XKEY : 0)
  2839. !             | ((stp->c_lflag & ICANON)
  2840. !                 ? 0
  2841. !                 : ((stp->c_lflag & ISIG) ? CBREAK : RAW)));
  2842.     sg.sg_ispeed = (char) stp->_c_ispeed;
  2843. !   sg.sg_ispeed = (char) stp->_c_ospeed;
  2844.     t.t_eofc         = (char) stp->c_cc[VEOF];
  2845.     t.t_brkc        = (char) stp->c_cc[VEOL];  
  2846.     sg.sg_erase        = (char) stp->c_cc[VERASE];
  2847. --- 144,153 ----
  2848.     }
  2849.     sg.sg_flags |= ((stp->c_lflag & (TOSTOP | NOFLSH | ECHO))
  2850.               | ((stp->c_lflag & IEXTEN) ? XKEY : 0)
  2851. !             | ((stp->c_lflag & ISIG)
  2852. !                ? (stp->c_lflag & ICANON ? 0 : CBREAK) : RAW));
  2853.     sg.sg_ispeed = (char) stp->_c_ispeed;
  2854. !   sg.sg_ospeed = (char) stp->_c_ospeed;
  2855.     t.t_eofc         = (char) stp->c_cc[VEOF];
  2856.     t.t_brkc        = (char) stp->c_cc[VEOL];  
  2857.     sg.sg_erase        = (char) stp->c_cc[VERASE];
  2858. *** 41.1    1993/11/03 13:33:02
  2859. --- thread.c    1994/01/09 18:08:38
  2860. ***************
  2861. *** 26,31 ****
  2862. --- 26,46 ----
  2863.   
  2864.   #define SIZE 4096L
  2865.   
  2866. + #ifdef __MBASE__    /* gcc -mbaserel data/bss base */
  2867. + #define mbasep() \
  2868. + ({    register long retvalue __asm__(__MBASESTR__);    \
  2869. +     retvalue;                    \
  2870. + })
  2871. + #define fixmbasep(addr) (void) \
  2872. + ({                        \
  2873. +     __asm__ volatile            \
  2874. +     (" movl    %0,"__MBASESTR__ ";"        \
  2875. +     :            /* outputs */    \
  2876. +     : "g"(addr)            /* inputs */    \
  2877. +     );                    \
  2878. + })
  2879. + #endif /* __MBASE__ */
  2880.   extern int __mint;
  2881.   extern long _childtime;            /* in main.c */
  2882.   extern long _sigpending, _sigmask;    /* in signal.c */
  2883. ***************
  2884. *** 54,59 ****
  2885. --- 69,77 ----
  2886.       _setstack( ((char *)b) + SIZE );
  2887.       func = (int (*) __PROTO((long)))b->p_dbase;
  2888.       arg = b->p_dlen;
  2889. + #ifdef __MBASE__
  2890. +     fixmbasep((long) (b->p_bbase));
  2891. + #endif /* __MBASE__ */
  2892.       Pterm((*func)(arg));
  2893.   }
  2894.   
  2895. ***************
  2896. *** 78,83 ****
  2897. --- 96,104 ----
  2898.       b->p_dbase = (char *)func;
  2899.       b->p_dlen = arg;
  2900.       b->p_hitpa = ((char *)b) + SIZE + 256;
  2901. + #ifdef __MBASE__
  2902. +     b->p_bbase = (char *) mbasep();
  2903. + #endif /* __MBASE__ */
  2904.    
  2905.       if (__mint)
  2906.           pid = Pexec(104, 0L, b, 0L);
  2907. ***************
  2908. *** 95,102 ****
  2909.   
  2910.           now = _clock();
  2911.           pid = Pexec(4, 0L, b, 0L);
  2912. -         (void)Mfree(b->p_env);    /* free the memory */
  2913. -         (void)Mfree(b);
  2914.   
  2915.           _base = savbase;
  2916.       /* restore signal stuff */
  2917. --- 116,121 ----
  2918. ***************
  2919. *** 115,119 ****
  2920. --- 134,140 ----
  2921.               _childtime += __waittime;
  2922.           }
  2923.       }
  2924. +     (void)Mfree(b->p_env);    /* free the memory */
  2925. +     (void)Mfree(b);
  2926.       return pid;
  2927.   }
  2928. *** 41.1    1993/11/03 13:33:02
  2929. --- unx2dos.c    1994/01/09 09:44:22
  2930. ***************
  2931. *** 171,180 ****
  2932.           _unx2dos(buf, dos);
  2933.           while (*dos)
  2934.               dos++;
  2935. !         *dos++ = ',';
  2936.       }        
  2937.   
  2938. !     *--dos = 0;
  2939.       return 0;
  2940.   }        
  2941.   
  2942. --- 171,181 ----
  2943.           _unx2dos(buf, dos);
  2944.           while (*dos)
  2945.               dos++;
  2946. !         if (*unx)
  2947. !           *dos++ = ',';
  2948.       }        
  2949.   
  2950. !     *dos = 0;
  2951.       return 0;
  2952.   }        
  2953.   
  2954. ***************
  2955. *** 198,206 ****
  2956.           _dos2unx(buf, unx);
  2957.           while (*unx)
  2958.               unx++;
  2959. !         *unx++ = ':';
  2960.       }
  2961.   
  2962. !     *--unx = 0;
  2963.       return 0;
  2964.   }
  2965. --- 199,208 ----
  2966.           _dos2unx(buf, unx);
  2967.           while (*unx)
  2968.               unx++;
  2969. !         if (*dos)
  2970. !           *unx++ = ':';
  2971.       }
  2972.   
  2973. !     *unx = 0;
  2974.       return 0;
  2975.   }
  2976. *** 41.1    1993/11/04 03:12:46
  2977. --- crlf/crlf.c    1994/01/09 14:01:58
  2978. ***************
  2979. *** 1,18 ****
  2980. ! /* crlf.c 1.1 by entropy@terminator.rs.itd.umich.edu
  2981.      PUBLIC DOMAIN -- NO RIGHTS RESERVED
  2982.      NO WARRANTY -- USE AT YOUR OWN RISK!!!!!!!!!
  2983.      strips/adds carriage returns from text files
  2984.   */
  2985.   
  2986.   #include <stdio.h>
  2987.   #include <stdlib.h>
  2988.   #include <unistd.h>
  2989.   #include <string.h>
  2990.   #ifdef __atarist__
  2991.   #include <compiler.h>
  2992.   #ifdef __TURBOC__
  2993.   #include <sys\types.h>
  2994.   #include <sys\stat.h>
  2995.   #else /* not __TURBOC__ */
  2996.   #include <sys/types.h>
  2997.   #include <sys/stat.h>
  2998. --- 1,29 ----
  2999. ! /* crlf.c 1.3 by entropy@terminator.rs.itd.umich.edu
  3000.      PUBLIC DOMAIN -- NO RIGHTS RESERVED
  3001.      NO WARRANTY -- USE AT YOUR OWN RISK!!!!!!!!!
  3002.      strips/adds carriage returns from text files
  3003.   */
  3004. + #ifndef __atarist__
  3005. + #ifdef __TOS__   /* #defined by TurboC / PureC */
  3006. +   #define __atarist__
  3007. + #endif
  3008. + #endif
  3009.   
  3010.   #include <stdio.h>
  3011.   #include <stdlib.h>
  3012.   #include <unistd.h>
  3013.   #include <string.h>
  3014. + #include <time.h>
  3015. + #include <utime.h>
  3016. + #define UNUSED(x)
  3017.   #ifdef __atarist__
  3018.   #include <compiler.h>
  3019.   #ifdef __TURBOC__
  3020.   #include <sys\types.h>
  3021.   #include <sys\stat.h>
  3022. + #undef UNUSED
  3023. + #define UNUSED(x) ((void)(x))
  3024.   #else /* not __TURBOC__ */
  3025.   #include <sys/types.h>
  3026.   #include <sys/stat.h>
  3027. ***************
  3028. *** 30,38 ****
  3029.   #define EXIT_SUCCESS 0
  3030.   #endif /* EXIT_SUCCESS */
  3031.   #ifdef __STDC__
  3032. ! #ifndef __NO_PROTO__
  3033.   #define __PROTO(x) x
  3034. ! #endif /* not __NO_PROTO__ */
  3035.   #define __EXTERN
  3036.   #else /* not __STDC__ */
  3037.   #define __EXTERN extern
  3038. --- 41,49 ----
  3039.   #define EXIT_SUCCESS 0
  3040.   #endif /* EXIT_SUCCESS */
  3041.   #ifdef __STDC__
  3042. ! #ifndef __NO___PROTO__
  3043.   #define __PROTO(x) x
  3044. ! #endif /* not __NO___PROTO__ */
  3045.   #define __EXTERN
  3046.   #else /* not __STDC__ */
  3047.   #define __EXTERN extern
  3048. ***************
  3049. *** 40,47 ****
  3050.   #endif /* not __STDC__ */
  3051.   #endif /* not __atarist__ */
  3052.   
  3053. - __EXTERN int utime __PROTO((char *path, struct utimbuf *times));
  3054.   extern char *optarg;
  3055.   extern int optind, opterr;
  3056.   
  3057. --- 51,56 ----
  3058. ***************
  3059. *** 50,63 ****
  3060.   #define CR_NONE 2
  3061.   
  3062.   char *program = NULL;
  3063.   
  3064.   void perror2 __PROTO((char *msg1, char *msg2));
  3065.   int crlf __PROTO((char *filename, int mode));
  3066.   int simple_outchar __PROTO((FILE *ofp, int c));
  3067.   int tounx_outchar __PROTO((FILE *ofp, int c));
  3068.   int totos_outchar __PROTO((FILE *ofp, int c));
  3069. ! int smart_copy __PROTO((char *ifn, char *ofn, 
  3070. !                         int (*outcharfunc)(FILE *, int)));
  3071.   
  3072.   void
  3073.   perror2(msg1, msg2)
  3074. --- 59,73 ----
  3075.   #define CR_NONE 2
  3076.   
  3077.   char *program = NULL;
  3078. + int verbose = 0;
  3079.   
  3080.   void perror2 __PROTO((char *msg1, char *msg2));
  3081.   int crlf __PROTO((char *filename, int mode));
  3082.   int simple_outchar __PROTO((FILE *ofp, int c));
  3083.   int tounx_outchar __PROTO((FILE *ofp, int c));
  3084.   int totos_outchar __PROTO((FILE *ofp, int c));
  3085. ! int smart_copy __PROTO((char *ifn, char *ofn,
  3086. !                       int (*outcharfunc)(FILE *, int)));
  3087.   
  3088.   void
  3089.   perror2(msg1, msg2)
  3090. ***************
  3091. *** 86,91 ****
  3092. --- 96,103 ----
  3093.     FILE *ofp;
  3094.     int c;
  3095.   {
  3096. +   if (c == '\r' ) /* first strip all CRs... */
  3097. +     return c;
  3098.     if (c == '\n')
  3099.     {
  3100.       fputc('\r', ofp);
  3101. ***************
  3102. *** 110,132 ****
  3103.   smart_copy(ifn, ofn, outcharfunc)
  3104.     char *ifn;
  3105.     char *ofn;
  3106. !   int (*outcharfunc)(FILE *, int);
  3107.   {
  3108.     FILE *ifp;
  3109.     FILE *ofp;
  3110.     int c;
  3111.   
  3112. !   if ((ifp = fopen(ifn, "rb")) == NULL)
  3113.     {
  3114. !     perror2(program, ifn);
  3115. !     return (-1);
  3116.     }
  3117. !   if ((ofp = fopen(ofn, "wb")) == NULL)
  3118.     {
  3119. !     fclose(ifp);
  3120. !     perror2(program, ofn);
  3121. !     return (-1);
  3122.     }
  3123.     c = fgetc(ifp);
  3124.     while (!(feof(ifp)) && !(ferror(ifp)) && !(ferror(ofp)))
  3125.     {
  3126. --- 122,160 ----
  3127.   smart_copy(ifn, ofn, outcharfunc)
  3128.     char *ifn;
  3129.     char *ofn;
  3130. !   int (*outcharfunc) __PROTO((FILE *, int));
  3131.   {
  3132.     FILE *ifp;
  3133.     FILE *ofp;
  3134.     int c;
  3135.   
  3136. !   if (*ifn) 
  3137.     {
  3138. !     if ((ifp = fopen(ifn, "rb")) == NULL)
  3139. !     {
  3140. !       perror2(program, ifn);
  3141. !       return (-1);
  3142. !     }
  3143.     }
  3144. !   else
  3145.     {
  3146. !     ifp = stdin;
  3147. !   }
  3148. !   if (*ofn) 
  3149. !   {
  3150. !     if ((ofp = fopen(ofn, "wb")) == NULL)
  3151. !     {
  3152. !       fclose(ifp);
  3153. !       perror2(program, ofn);
  3154. !       return (-1);
  3155. !     }
  3156.     }
  3157. +   else
  3158. +   {
  3159. +     ofp = stdout;
  3160. +   }
  3161. +   setvbuf(ofp, NULL, _IOFBF, 50*1024L);
  3162. +   setvbuf(ifp, NULL, _IOFBF, 50*1024L);
  3163.     c = fgetc(ifp);
  3164.     while (!(feof(ifp)) && !(ferror(ifp)) && !(ferror(ofp)))
  3165.     {
  3166. ***************
  3167. *** 136,159 ****
  3168.     if (ferror(ifp))
  3169.     {
  3170.       perror2(program, ifn);
  3171. !     fclose(ifp);
  3172. !     fclose(ofp);
  3173.       return (-1);
  3174.     }
  3175.     if (ferror(ofp))
  3176.     {
  3177.       perror2(program, ofn);
  3178. !     fclose(ifp);
  3179. !     fclose(ofp);
  3180.       return (-1);
  3181.     }
  3182. !   if (fclose(ifp) == EOF)
  3183.     {
  3184.       perror2(program, ifn);
  3185. !     fclose(ofp);
  3186.       return (-1);
  3187.     }
  3188. !   if (fclose(ofp) == EOF)
  3189.     {
  3190.       perror2(program, ofn);
  3191.       return (-1);
  3192. --- 164,202 ----
  3193.     if (ferror(ifp))
  3194.     {
  3195.       perror2(program, ifn);
  3196. !     if (*ifn)
  3197. !     {
  3198. !       fclose(ifp);
  3199. !     }
  3200. !     if (*ofn)
  3201. !     {
  3202. !       fclose(ofp);
  3203. !     }
  3204.       return (-1);
  3205.     }
  3206.     if (ferror(ofp))
  3207.     {
  3208.       perror2(program, ofn);
  3209. !     if (*ifn)
  3210. !     {
  3211. !       fclose(ifp);
  3212. !     }
  3213. !     if (*ofn)
  3214. !     {
  3215. !       fclose(ofp);
  3216. !     }
  3217.       return (-1);
  3218.     }
  3219. !   if (*ifn && fclose(ifp) == EOF)
  3220.     {
  3221.       perror2(program, ifn);
  3222. !     if (*ofn)
  3223. !     {
  3224. !       fclose(ofp);
  3225. !     }
  3226.       return (-1);
  3227.     }
  3228. !   if (*ofn && fclose(ofp) == EOF)
  3229.     {
  3230.       perror2(program, ofn);
  3231.       return (-1);
  3232. ***************
  3233. *** 166,181 ****
  3234.     char *filename;
  3235.     int mode; /* 0 == strip CR's, 1 == add CR's */
  3236.   {
  3237. !   char tempname[256];
  3238. !   int (*outcharfunc)(FILE *, int);
  3239.   
  3240. -   strcpy(tempname, "/tmp/crlfXXXXXX");
  3241. -   if (mktemp(tempname) == NULL)
  3242. -   {
  3243. -     fputs(program, stderr);
  3244. -     fputs(": could not get a temporary filename\n", stderr);
  3245. -     return (-1);
  3246. -   }
  3247.     switch (mode)
  3248.     {
  3249.       case CR_ADD:
  3250. --- 209,218 ----
  3251.     char *filename;
  3252.     int mode; /* 0 == strip CR's, 1 == add CR's */
  3253.   {
  3254. !   char tempname[FILENAME_MAX];
  3255. !   char *ev;
  3256. !   int (*outcharfunc) __PROTO((FILE *, int));
  3257.   
  3258.     switch (mode)
  3259.     {
  3260.       case CR_ADD:
  3261. ***************
  3262. *** 186,204 ****
  3263.         outcharfunc = tounx_outchar;
  3264.         break;
  3265.     }
  3266. !   if (smart_copy(filename, tempname, outcharfunc))
  3267.     {
  3268. !     return (-1);
  3269.     }
  3270. !   if (rename(tempname, filename))
  3271.     {
  3272. !     if (smart_copy(tempname, filename, simple_outchar))
  3273.       {
  3274.         return (-1);
  3275.       }
  3276. !     if (unlink(tempname))
  3277.       {
  3278. -       perror2(program, tempname);
  3279.         return (-1);
  3280.       }
  3281.     }
  3282. --- 223,270 ----
  3283.         outcharfunc = tounx_outchar;
  3284.         break;
  3285.     }
  3286. !   if (verbose)
  3287.     {
  3288. !     fputs(filename, stderr);
  3289. !     fputc('\n', stderr);
  3290.     }
  3291. !   if (*filename)
  3292.     {
  3293. !     *tempname = '\0';
  3294. !     if ((ev = getenv("TEMP")) || (ev = getenv("TMP"))
  3295. !         || (ev = getenv("TMPDIR")))
  3296. !     {
  3297. !       strcpy(tempname, ev);
  3298. !       strcat(tempname, "/");
  3299. !     }
  3300. !     strcat(tempname, "crlfXXXX");
  3301. !     if (mktemp(tempname) == NULL)
  3302.       {
  3303. +       fputs(program, stderr);
  3304. +       fputs(": could not get a temporary filename\n", stderr);
  3305.         return (-1);
  3306.       }
  3307. !     if (smart_copy(filename, tempname, outcharfunc))
  3308. !     {
  3309. !       return (-1);
  3310. !     }
  3311. !     if (rename(tempname, filename))
  3312. !     {
  3313. !       if (smart_copy(tempname, filename, simple_outchar))
  3314. !       {
  3315. !         return (-1);
  3316. !       }
  3317. !       if (unlink(tempname))
  3318. !       {
  3319. !         perror2(program, tempname);
  3320. !         return (-1);
  3321. !       }
  3322. !     }
  3323. !   }
  3324. !   else
  3325. !   {
  3326. !     if (smart_copy("", "", outcharfunc))
  3327.       {
  3328.         return (-1);
  3329.       }
  3330.     }
  3331. ***************
  3332. *** 214,222 ****
  3333.     int err = 0;
  3334.     struct stat st;
  3335.     struct utimbuf ut;
  3336. !   
  3337.     program = argv[0];
  3338. !   while ((c = getopt(argc, argv, "as")) != EOF)
  3339.     {
  3340.       switch (c)
  3341.       {
  3342. --- 280,289 ----
  3343.     int err = 0;
  3344.     struct stat st;
  3345.     struct utimbuf ut;
  3346. !   UNUSED(envp);
  3347.     program = argv[0];
  3348. !   while ((c = getopt(argc, argv, "asv")) != EOF)
  3349.     {
  3350.       switch (c)
  3351.       {
  3352. ***************
  3353. *** 224,230 ****
  3354.           if (mode == CR_NONE)
  3355.           {
  3356.             mode = CR_ADD;
  3357. !            }
  3358.           else
  3359.           {
  3360.             err++;
  3361. --- 291,297 ----
  3362.           if (mode == CR_NONE)
  3363.           {
  3364.             mode = CR_ADD;
  3365. !         }
  3366.           else
  3367.           {
  3368.             err++;
  3369. ***************
  3370. *** 234,245 ****
  3371.           if (mode == CR_NONE)
  3372.           {
  3373.             mode = CR_STRIP;
  3374. !            }
  3375.           else
  3376.           {
  3377.             err++;
  3378.           }
  3379.           break;
  3380.         case '?':
  3381.         default:
  3382.           err++;
  3383. --- 301,315 ----
  3384.           if (mode == CR_NONE)
  3385.           {
  3386.             mode = CR_STRIP;
  3387. !         }
  3388.           else
  3389.           {
  3390.             err++;
  3391.           }
  3392.           break;
  3393. +       case 'v':
  3394. +         verbose = 1;
  3395. +         break;
  3396.         case '?':
  3397.         default:
  3398.           err++;
  3399. ***************
  3400. *** 250,290 ****
  3401.     {
  3402.       err++;
  3403.     }
  3404. !   if (err || (optind >= argc))
  3405.     {
  3406.       fputs("usage:  ", stderr);
  3407.       fputs(program, stderr);
  3408. !     fputs(" -s file [file2 [...]] (to strip carriage returns)\n", stderr);
  3409.       fputs("        ", stderr);
  3410.       fputs(program, stderr);
  3411. !     fputs(" -a file [file2 [...]] (to add carriage returns)\n", stderr);
  3412.       exit(EXIT_FAILURE);
  3413.     }
  3414. !   for ( ; optind < argc; optind++)
  3415.     {
  3416. !     fn = argv[optind];
  3417. !     if (access(fn, 4))
  3418.       {
  3419.         err++;
  3420. -       perror2(program, fn);
  3421. -       continue;
  3422.       }
  3423. !     if (stat(fn, &st))
  3424. !     {
  3425. !       err++;
  3426. !       perror2(program, fn);
  3427. !     }
  3428. !     ut.actime = st.st_atime;
  3429. !     ut.modtime = st.st_mtime;
  3430. !     if (crlf(fn, mode) != 0)
  3431. !     {
  3432. !       err++;
  3433. !       continue;
  3434. !     }
  3435. !     if (utime(fn, &ut))
  3436.       {
  3437. !       err++;
  3438. !       perror2(program, fn);
  3439.       }
  3440.     }
  3441.     if (err)
  3442. --- 320,380 ----
  3443.     {
  3444.       err++;
  3445.     }
  3446. !   if (err)
  3447.     {
  3448.       fputs("usage:  ", stderr);
  3449.       fputs(program, stderr);
  3450. !     fputs(" -s[v] [file [file2 [...]]] (to strip carriage returns)\n", stderr);
  3451.       fputs("        ", stderr);
  3452.       fputs(program, stderr);
  3453. !     fputs(" -a[v] [file [file2 [...]]] (to add carriage returns)\n", stderr);
  3454.       exit(EXIT_FAILURE);
  3455.     }
  3456. !   if (optind == argc)
  3457.     {
  3458. !     if (crlf("", mode) != 0)
  3459.       {
  3460.         err++;
  3461.       }
  3462. !   }
  3463. !   else
  3464. !   {
  3465. !     for ( ; optind < argc; optind++)
  3466.       {
  3467. !       fn = argv[optind];
  3468. !       if (access(fn, 4))
  3469. !       {
  3470. !         err++;
  3471. !         perror2(program, fn);
  3472. !         continue;
  3473. !       }
  3474. !       if (stat(fn, &st))
  3475. !       {
  3476. !         err++;
  3477. !         perror2(program, fn);
  3478. !       }
  3479. !       if (!(S_ISREG(st.st_mode)))
  3480. !       {
  3481. !         if (verbose)
  3482. !         {
  3483. !           fputs("crlf:  ignoring non-regular file ", stderr);
  3484. !           fputs(fn, stderr);
  3485. !           fputc('\n', stdout);
  3486. !         }
  3487. !         continue;
  3488. !       }
  3489. !       ut.actime = st.st_atime;
  3490. !       ut.modtime = st.st_mtime;
  3491. !       if (crlf(fn, mode) != 0)
  3492. !       {
  3493. !         err++;
  3494. !         continue;
  3495. !       }
  3496. !       if (utime(fn, &ut))
  3497. !       {
  3498. !         err++;
  3499. !         perror2(program, fn);
  3500. !       }
  3501.       }
  3502.     }
  3503.     if (err)
  3504. *** 41.1    1993/11/04 03:12:46
  3505. --- crlf/crlf.doc    1994/01/09 14:40:08
  3506. ***************
  3507. *** 1,8 ****
  3508.   crlf.c by entropy@terminator.rs.itd.umich.edu
  3509.   PUBLIC DOMAIN -- NO RIGHTS RESERVED
  3510.   
  3511. ! usage:  crlf -s file [file2 [...]] (to strip carriage returns)
  3512. !         crlf -a file [file2 [...]] (to add carriage returns)
  3513.   
  3514.   crlf converts text files between TOS (MS-DOS) and UNIX style line
  3515.   terminators.
  3516. --- 1,9 ----
  3517.   crlf.c by entropy@terminator.rs.itd.umich.edu
  3518.   PUBLIC DOMAIN -- NO RIGHTS RESERVED
  3519.   
  3520. ! usage:  crlf -s [file [...]] (to strip carriage returns)
  3521. !         crlf -a [file [...]] (to add carriage returns)
  3522.   
  3523.   crlf converts text files between TOS (MS-DOS) and UNIX style line
  3524.   terminators.
  3525. ***************
  3526. *** 13,19 ****
  3527.   file.  Be careful that you do not run this twice on the same file (or at all
  3528.   on a file that already has carriage returns) as you will end up with really
  3529.   strange line terminators that way (recover by stripping and re-adding
  3530. ! returns.
  3531.   
  3532.   If any errors/warnings occur while trying to convert a file, an error status
  3533.   will be returned to the OS when the program exits.  If you are running from
  3534. --- 14,23 ----
  3535.   file.  Be careful that you do not run this twice on the same file (or at all
  3536.   on a file that already has carriage returns) as you will end up with really
  3537.   strange line terminators that way (recover by stripping and re-adding
  3538. ! returns).
  3539. ! If no file is specified the input is read from `stdin' and put to `stdout'.
  3540. ! So you can use it as filter in a pipe.
  3541.   
  3542.   If any errors/warnings occur while trying to convert a file, an error status
  3543.   will be returned to the OS when the program exits.  If you are running from
  3544. Binary files /tmp/T0273000 and crlf/crlf.ttp differ
  3545. *** 41.1    1993/11/04 03:12:46
  3546. --- crlf/makefile    1994/01/09 13:48:14
  3547. ***************
  3548. *** 9,17 ****
  3549.   
  3550.   .SUFFIXES: .ttp .tos .prg .sym
  3551.   
  3552. - .o.ttp:
  3553. -     $(CC) $(LDFLAGS) $< -o $@ $(LIBS)
  3554.   #
  3555.   #
  3556.   all: crlf.ttp
  3557. --- 9,14 ----
  3558. ***************
  3559. *** 19,24 ****
  3560. --- 16,22 ----
  3561.   #
  3562.   #
  3563.   crlf.ttp: crlf.o
  3564. +     $(CC) $(LDFLAGS) $< -o $@ $(LIBS)
  3565.   crlf.o: crlf.c
  3566.   
  3567.   #
  3568. *** /dev/null    Sun Jan 16 05:00:22 1994
  3569. --- purec/unixname/unixname.s    Wed Nov  3 22:20:38 1993
  3570. ***************
  3571. *** 0 ****
  3572. --- 1,113 ----
  3573. + ;{{{}}}
  3574. + ;{{{  about this file
  3575. + ; Author: Michael Schwingen
  3576. + ;         Kranichstraße 10
  3577. + ;         5042 Erftstadt
  3578. + ; purpose:
  3579. + ; Unixname installes itself resident in the GEMDOS trap vector and converts
  3580. + ; all '/'s in filenames to TOS-like '\'.
  3581. + ; Assembler: DevpacST 2.0
  3582. + ;}}}
  3583. + ;{{{  List of GEMDOS-functions and address of filename on stack
  3584. + ; 57 (Dcreate)  : 8(SP)
  3585. + ; 58 (Ddelete)  : 8(SP)
  3586. + ; 59 (Dsetpath) : 8(SP)
  3587. + ; 60 (Fcreate)  : 8(SP)
  3588. + ; 61 (Fopen)    : 8(SP)
  3589. + ; 65 (Fdelete)  : 8(SP)
  3590. + ; 67 (Fattrib)  : 8(SP)
  3591. + ; 75 (Pexec)    : 10(SP) - 8(SP) = mode, changes only if 0/3 !
  3592. + ; 78 (Fsfirst)  : 8(SP)
  3593. + ; 86 (Frename)  : 10(SP),14(SP)
  3594. + ;}}}
  3595. +               opt o+
  3596. + start:        bra     init
  3597. + ;{{{  new trap#1 handler
  3598. +               DC.B "XBRAUn*x"
  3599. + oldvec:       DC.L 0
  3600. + new_vec:      move.w  (sp),d0         ; get SR
  3601. +               lea     6(sp),a0
  3602. +               btst    #$0D,d0         ; SUPER-mode ?
  3603. +               bne.s   .new2           ; yes
  3604. +               move    usp,a0          ; no, parameters are on userstack
  3605. + .new2:        move.w  (a0),d0         ; get GEMDOS Opcode
  3606. +               cmp.w   #57,d0          ; Dcreate() ?
  3607. +               beq     func_type1
  3608. +               cmp.w   #58,d0          ; Ddelete() ?
  3609. +               beq     func_type1
  3610. +               cmp.w   #59,d0          ; Dsetpath() ?
  3611. +               beq     func_type1
  3612. +               cmp.w   #60,d0          ; Fcreate() ?
  3613. +               beq     func_type1
  3614. +               cmp.w   #61,d0          ; Fopen() ?
  3615. +               beq     func_type1
  3616. +               cmp.w   #65,d0          ; Fdelete() ?
  3617. +               beq     func_type1
  3618. +               cmp.w   #67,d0          ; Fattrib() ?
  3619. +               beq     func_type1
  3620. +               cmp.w   #75,d0          ; Pexec() ?
  3621. +               beq     func_pexec
  3622. +               cmp.w   #78,d0          ; Fsfirst() ?
  3623. +               beq     func_type1
  3624. +               cmp.w   #86,d0          ; Frename() ?
  3625. +               beq     func_frename
  3626. + old_vec:      movea.l oldvec,a0
  3627. +               jmp     (a0)
  3628. + func_type1:   movea.l 2(a0),a0        ; ptr to filename
  3629. + func1_1:      bsr     convert_name
  3630. +               bra.s   old_vec
  3631. + func_pexec:   move.w  2(a0),d0        ; mode: 0/3 = filename at 4(a0)
  3632. +               cmp.w   #0,d0
  3633. +               beq.s   .pexec2
  3634. +               cmp.w   #3,d0
  3635. +               bne.s   old_vec
  3636. + .pexec2:      movea.l 4(a0),a0
  3637. +               bra.s   func1_1
  3638. + func_frename: move.l  a0,-(sp)
  3639. +               movea.l 8(a0),a0
  3640. +               bsr     convert_name
  3641. +               movea.l (sp)+,a0
  3642. +               bra.s   func_pexec
  3643. + ;}}}
  3644. + ;{{{  convert_name: convert '/' -> '\'  at (a0)+
  3645. + convert_name:
  3646. +               move.b  (a0),d0
  3647. +               beq     .convend
  3648. +               cmp.b   #"/",d0
  3649. +               bne     .convnext
  3650. +               move.b  #"\",(a0)
  3651. + .convnext:    addq.l  #1,a0
  3652. +               bra.s   convert_name
  3653. + .convend:     rts
  3654. + ;}}}
  3655. + res_len       EQU *-start
  3656. + ; everything after this point does not stay resident in memory
  3657. + ;{{{  install resident part
  3658. + init:         pea     new_vec(pc)
  3659. +               move.l  #$050021,-(sp)  ; Setexc(33,...)
  3660. +               trap    #13
  3661. +               addq.l  #8,sp
  3662. +               move.l  d0,oldvec
  3663. +               lea     inst_txt(pc),a0
  3664. +               bsr     Cconws
  3665. +               clr.w   -(sp)           ; Ret.-Code
  3666. +               move.l  #256+res_len,-(sp)
  3667. +               move.w  #49,-(sp)       ; Ptermres()
  3668. +               trap    #1
  3669. + ;}}}
  3670. + ;{{{  Cconws: print text
  3671. + Cconws:       move.l  a0,-(sp)
  3672. +               move.w  #9,-(sp)
  3673. +               trap    #1              ; Cconws
  3674. +               addq.l  #6,sp
  3675. +               rts
  3676. + ;}}}
  3677. + inst_txt:     DC.B 13,10,"Un*xName V1.0 © 1991 by Michael Schwingen installed.",13,10,0
  3678. Binary files /dev/null and purec/unixname/unixname.tos differ
  3679. *** /dev/null    Sun Jan 16 05:00:42 1994
  3680. --- purec/unixname/unixname.txt    Wed Nov  3 22:20:40 1993
  3681. ***************
  3682. *** 0 ****
  3683. --- 1,49 ----
  3684. + UNIXNAME V1.0
  3685. + -------------
  3686. +   Unixname is a little utility which installes  itself  in  the  GEMDOS  trap
  3687. + vector. It then monitors all file functions and watches if filenames  contain
  3688. + '/'. If a '/' is found, it is then converted into a '\'. This  is  especially
  3689. + useful  when  porting  Un*x-software  which  does   things   like   '#include
  3690. + <local/argparse.h>' - you don't have to change it in the sources.
  3691. +   If a program does something like 'fh = open("bind/test")', this  will  work
  3692. + while Unixname is installed - so remember to change  this  because  otherwise
  3693. + every user would need Unixname to run that program.
  3694. + Unixname watches the following GEMDOS functions:
  3695. +   57 (Dcreate)
  3696. +   58 (Ddelete)
  3697. +   59 (Dsetpath)
  3698. +   60 (Fcreate)
  3699. +   61 (Fopen)
  3700. +   65 (Fdelete)
  3701. +   67 (Fattrib)
  3702. +   75 (Pexec)
  3703. +   78 (Fsfirst)
  3704. +   86 (Frename)
  3705. + Unixname is distributed in source and binary form. The program  and  code  is
  3706. + copyrighted, but may be freely distributed under the following conditions:
  3707. +  - The source code must be available along with the  binaries.  The  binaries
  3708. +    may be omitted. This documentation must always  be copied in an unmodified
  3709. +    form.
  3710. +  - Modified versions must be clearly marked as such. The copyright  note  and
  3711. +    my name may not me removed from source or binaries. I would  appreciate if
  3712. +    you send me a copy of modified versions.
  3713. +  - No charge may be made other than a reasonable charge for reproduction.
  3714. +  - I am not responsible for any consequences resulting from the  use  or  the
  3715. +    inability to use this software, even if they result from defects in it.
  3716. +  - The program may be distributed together with commercial programs  if  both
  3717. +    source and binaries are distributed and if is made clear that this program
  3718. +    is public domain.
  3719. + You can make as many copies of this programs as you wish. Give it to friends,
  3720. + distribute it via networks or do whatever you want to do with it.
  3721. + If you have any problems with this program, feel free to contact me:
  3722. + Michael Schwingen
  3723. + Ahornstrasse 36
  3724. + W-5100 Aachen
  3725. + Germany
  3726. + Internet: michaels@messua.informatik.rwth-aachen.de
  3727.